Installs Crystal language binaries from GitHub releases.
- 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
wgetorcurl. - 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.19resolves to1.19.1). - Fetches available versions via
git ls-remote(no API rate limits). - Supports many different OSes:
- Linux
- macOS
- Has tests.
- Does not require upgrading every time a new Crystal version comes out.
- Does not require recipes for each individual Crystal version.
List available Crystal versions:
$ crystal-installInstall the latest version of Crystal:
$ crystal-install latestInstall a stable version of Crystal:
$ crystal-install 1.19Install a specific version of Crystal:
$ crystal-install 1.19.1Install Crystal into a specific directory:
$ crystal-install --install-dir /path/to/dir 1.19.1Install Crystal into /usr/local:
$ sudo crystal-install --system 1.19.1Install Crystal without installing dependencies first:
$ crystal-install --no-install-deps 1.19.1Skip reinstallation if version is already installed:
$ crystal-install --no-reinstall 1.19.1Force update the cached version list:
$ crystal-install --updateUninstall a Crystal version:
$ rm -rf ~/.crystals/crystal-1.19.1Using crystal-install with chcrystal:
$ crystal-install 1.19.1
$ chcrystal 1.19.1
$ crystal --versionwget 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 installgit clone https://github.com/vanhecke/crystal-install.git
cd crystal-install/
sudo make installsudo make uninstallcrystal-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.
- postmodern for creating ruby-install and chruby, which served as the blueprint for this project.