slack: Updatescript allow independent updates between linux and macos

This commit is contained in:
Sebastian Sellmeier 2023-09-25 00:03:49 +02:00
parent edae7081a3
commit 599abc266c
No known key found for this signature in database
GPG key ID: 51E2BE0CCC826F98

View file

@ -6,12 +6,6 @@ set -eou pipefail
latest_linux_version=$(curl -L --silent https://slack.com/downloads/linux | sed -n 's/.*Version \([0-9\.]\+\).*/\1/p')
latest_mac_version=$(curl -L --silent https://slack.com/downloads/mac | sed -n 's/.*Version \([0-9\.]\+\).*/\1/p')
# Double check that the latest mac and linux versions are in sync.
if [[ "$latest_linux_version" != "$latest_mac_version" ]]; then
echo "the latest linux ($latest_linux_version) and mac ($latest_mac_version) versions are not the same"
exit 1
fi
nixpkgs="$(git rev-parse --show-toplevel)"
slack_nix="$nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix"
nixpkgs_linux_version=$(cat "$slack_nix" | sed -n 's/.*x86_64-linux-version = \"\([0-9\.]\+\)\";.*/\1/p')