biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / depotdownloader / update.sh
blob2adbb6037a9d66a305f0f82bbd3e58f73603d6ae
1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=./. -i bash -p jq curl common-updater-scripts nix coreutils
4 set -eou pipefail
6 currentVersion="$(nix eval --raw -f . depotdownloader.version)"
7 latestVersion="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/SteamRE/DepotDownloader/releases?per_page=1" \
8 | jq -r '.[].name' | cut -d' ' -f2)"
10 if [[ "$currentVersion" = "$latestVersion" ]]; then
11 echo "Already up to date!"
12 exit
15 update-source-version depotdownloader "$latestVersion"
16 $(nix-build -A depotdownloader.fetch-deps --no-out-link)