2021-08-15 15:51:24 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
function install () {
|
2021-08-17 05:08:52 +00:00
|
|
|
cd ~
|
2021-08-15 15:51:24 +00:00
|
|
|
curl -O https://download.clojure.org/install/linux-install-1.10.3.943.sh
|
|
|
|
chmod +x linux-install-1.10.3.943.sh
|
|
|
|
sudo ./linux-install-1.10.3.943.sh
|
|
|
|
|
|
|
|
wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
|
|
|
|
sudo chmod +x lein
|
|
|
|
sudo mv lein /usr/bin
|
|
|
|
|
|
|
|
sudo lein
|
|
|
|
|
|
|
|
sudo rm linux-install-1.10.3.943.sh
|
2021-08-17 05:08:52 +00:00
|
|
|
|
|
|
|
printf "\n\n"
|
|
|
|
clj --version
|
2021-08-15 15:51:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$1" == "install" ]; then
|
|
|
|
if test ! $(which java); then
|
|
|
|
./java.sh install
|
|
|
|
fi
|
|
|
|
install
|
|
|
|
elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
|
|
|
|
uninstall
|
|
|
|
else
|
|
|
|
echo "please specify args with install or uninstall"
|
|
|
|
fi
|