flirt: init at 0.2 (#362189)
[NixPkgs.git] / pkgs / development / tools / unityhub / update.sh
blob646652aa6fc442769520a89328c6a0361553f1ec
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl common-updater-scripts
3 # set -euo pipefail
5 new_version="$(curl https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local/dists/stable/main/binary-amd64/Packages --silent | sed -nE "s/^Version: ([0-9]+\.[0-9]+\.[0-9]+)$/\1/p" | sort -V | tail -n 1)"
6 old_version="$(sed -nE 's/^\s*version = "([0-9]+\.[0-9]+\.[0-9]+)";$/\1/p' ./default.nix)"
8 if [[ "$new_version" == "$old_version" ]]; then
9 echo "Up to date"
10 exit 0
13 update-source-version unityhub "$new_version"