add crystal

This commit is contained in:
Reinaldy Rafli 2022-05-04 22:35:13 +07:00
parent c55e1aeea2
commit ca3364b2bc
No known key found for this signature in database
GPG Key ID: 748A8EC5DB8653E8
2 changed files with 20 additions and 0 deletions

View File

@ -148,3 +148,4 @@ eval "$(starship init bash)"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
[[ -s "/home/reinaldy/.sdkman/bin/sdkman-init.sh" ]] && source "/home/reinaldy/.sdkman/bin/sdkman-init.sh" [[ -s "/home/reinaldy/.sdkman/bin/sdkman-init.sh" ]] && source "/home/reinaldy/.sdkman/bin/sdkman-init.sh"
. "$HOME/.cargo/env"

19
scripts/crystal.sh Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
function install () {
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
sudo apt-get update
sudo apt-get install -y crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libz-dev
}
function uninstall () {
sudo apt-get remove -y crystal
}
if [ "$1" == "install" ]; then
install
elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
uninstall
else
echo "please specify args with install or uninstall"
fi