scripts/devel/update-amm
Alexander Gehrke 5b0216753e updates
2023-02-13 18:08:13 +01:00

15 lines
421 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 -E $versions \
| jq -r ".assets | map(select(.name | startswith(\"$1\")))[0].browser_download_url")
) > $2
chmod +x $2
}
download-version 2.13 $(which amm)2.13
download-version 2.12 $(which amm)2.12
download-version 3.1 $(which amm)3