Skip to content

vanhecke/crystal-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crystal-install

Installs Crystal language binaries from GitHub releases.

Features

  • Supports downloading the latest versions from Crystal's GitHub releases.
  • Supports installing into /opt/crystals/ for root and ~/.crystals/ for users by default.
  • Supports installing into arbitrary directories.
  • Supports downloading from arbitrary URLs.
  • Supports downloading archives using wget or curl.
  • Supports verifying downloaded archives via SHA256 checksums.
  • Supports installing runtime dependencies from the package manager (apt, dnf, yum, pacman, zypper, xbps, brew, macports, and pkg).
  • Supports partial version matching (e.g. 1.19 resolves to 1.19.1).
  • Fetches available versions via git ls-remote (no API rate limits).
  • Supports many different OSes:
  • Has tests.

Anti-Features

  • Does not require upgrading every time a new Crystal version comes out.
  • Does not require recipes for each individual Crystal version.

Requirements

Synopsis

List available Crystal versions:

$ crystal-install

Install the latest version of Crystal:

$ crystal-install latest

Install a stable version of Crystal:

$ crystal-install 1.19

Install a specific version of Crystal:

$ crystal-install 1.19.1

Install Crystal into a specific directory:

$ crystal-install --install-dir /path/to/dir 1.19.1

Install Crystal into /usr/local:

$ sudo crystal-install --system 1.19.1

Install Crystal without installing dependencies first:

$ crystal-install --no-install-deps 1.19.1

Skip reinstallation if version is already installed:

$ crystal-install --no-reinstall 1.19.1

Force update the cached version list:

$ crystal-install --update

Uninstall a Crystal version:

$ rm -rf ~/.crystals/crystal-1.19.1

Integration

Using crystal-install with chcrystal:

$ crystal-install 1.19.1
$ chcrystal 1.19.1
$ crystal --version

Install

wget https://github.com/vanhecke/crystal-install/archive/v0.1.0/crystal-install-0.1.0.tar.gz
tar -xzvf crystal-install-0.1.0.tar.gz
cd crystal-install-0.1.0/
sudo make install

From Source

git clone https://github.com/vanhecke/crystal-install.git
cd crystal-install/
sudo make install

Uninstall

sudo make uninstall

Credits

crystal-install is inspired by and structurally based on ruby-install by postmodern. The architecture, test patterns, and CI approach are directly adapted from his work.

About

Installs Crystal language binaries from GitHub releases

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors