2021-11-24 14:14:39 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-01-20 15:16:51 +00:00
|
|
|
VERSION="1.18.1"
|
2021-11-24 14:14:39 +00:00
|
|
|
|
|
|
|
function install () {
|
|
|
|
cd ~
|
2022-01-20 15:16:51 +00:00
|
|
|
wget https://github.com/janet-lang/janet/releases/download/v${VERSION}/janet-v${VERSION}-linux-x64.tar.gz
|
|
|
|
tar zxvf janet-v${VERSION}-linux-x64.tar.gz
|
|
|
|
sudo mv janet-v${VERSION}-linux janet
|
|
|
|
sudo mv janet /opt/janet
|
|
|
|
sudo rm janet-v${VERSION}-linux-x64.tar.gz
|
2021-11-24 14:14:39 +00:00
|
|
|
|
|
|
|
git clone --depth=1 https://github.com/janet-lang/jpm.git
|
|
|
|
cd jpm
|
2022-01-20 15:16:51 +00:00
|
|
|
sudo janet bootstrap.janet
|
2021-11-24 14:14:39 +00:00
|
|
|
|
|
|
|
printf "\n\n"
|
2022-01-20 15:16:51 +00:00
|
|
|
janet --version
|
2021-11-24 14:14:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$1" == "install" ]; then
|
|
|
|
install
|
|
|
|
elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
|
|
|
|
uninstall
|
|
|
|
else
|
|
|
|
echo "please specify args with install or uninstall"
|
|
|
|
fi
|