mitmproxy: relax some dependencies to fix build (#380668)
[NixPkgs.git] / pkgs / by-name / sn / snipaste / update.sh
blob1c6843fe6839afda6f76b02fa52526dc84c2b57d
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p bash curl coreutils jq common-updater-scripts
4 latestTag=$(curl -sSfL https://www.snipaste.com/linux_version | jq -r ".subject")
5 latestVersion="$(expr "$latestTag" : 'v\(.*\)')"
6 currentVersion=$(nix-instantiate --eval -E "with import ./. {}; snipaste.version" | tr -d '"')
8 if [[ "$latestVersion" == "$currentVersion" ]]; then
9 echo "package is up-to-date"
10 exit 0
13 prefetch=$(nix-prefetch-url "https://download.snipaste.com/archives/Snipaste-$latestVersion-x86_64.AppImage")
14 hash=$(nix-hash --type sha256 --to-sri "$prefetch")
15 update-source-version snipaste "$latestVersion" "$hash" --ignore-same-version