2018-06-30 18:03:17 +01:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell -i bash -p curl pcre common-updater-scripts
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
2019-11-24 17:22:28 +00:00
|
|
|
oldVersion=$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion zoom-us" | tr -d '"')
|
2018-06-30 18:03:17 +01:00
|
|
|
version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcregrep -o1 '/(([0-9]\.?)+)/')"
|
2019-04-06 18:30:32 +01:00
|
|
|
|
|
|
|
if [ ! "${oldVersion}" = "${version}" ]; then
|
|
|
|
update-source-version zoom-us "$version"
|
|
|
|
nixpkgs="$(git rev-parse --show-toplevel)"
|
|
|
|
default_nix="$nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix"
|
|
|
|
git add "${default_nix}"
|
|
|
|
git commit -m "zoom-us: ${oldVersion} -> ${version}"
|
|
|
|
else
|
|
|
|
echo "zoom-us is already up-to-date"
|
|
|
|
fi
|