Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / osu-lazer / update.sh
blob8e9849db1e1681a0d8925ece5699e450c87eef73
1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=../../../. -i bash -p curl jq common-updater-scripts
3 set -eo pipefail
4 cd "$(dirname "${BASH_SOURCE[0]}")"
6 new_version="$(curl -s "https://api.github.com/repos/ppy/osu/releases?per_page=1" | jq -r '.[0].name')"
7 old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
8 if [[ "$new_version" == "$old_version" ]]; then
9 echo "Up to date"
10 exit 0
13 cd ../../..
15 if [[ "$1" != "--deps-only" ]]; then
16 update-source-version osu-lazer "$new_version"
19 $(nix-build . -A osu-lazer.fetch-deps --no-out-link)