scripts/bin/update-amm
Alexander Gehrke cefd40b6dc Initial commit
2019-09-30 14:49:14 +02:00

14 lines
379 B
Bash
Executable file

#!/bin/zsh
versions=$(curl -L https://api.github.com/repos/lihaoyi/Ammonite/releases/latest)
download-version() {
(
echo "#/usr/bin/env python --version sh" && \
curl -L $( echo $versions \
| jq -r ".assets | map(select(.name | startswith(\"$1\")))[0].browser_download_url")
) > $2
chmod +x $2
}
download-version 2.13 $(which amm)
download-version 2.12 $(which amm)2.12