1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=./. -i bash -p jq curl common-updater-scripts nix coreutils
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!"
15 update-source-version depotdownloader
"$latestVersion"
16 $
(nix-build
-A depotdownloader.fetch-deps
--no-out-link)