teamspeak_server: fix updateScript

(cherry picked from commit 18f28923c6dd34aec04ca95ebeb2384fe9249db3)
This commit is contained in:
Tobias Happ 2021-05-27 17:55:17 +02:00 committed by github-actions[bot]
parent fc924fc34e
commit c60da1cb0d

View File

@ -30,14 +30,14 @@ in stdenv.mkDerivation rec {
passthru.updateScript = writeScript "update-teampeak-server" '' passthru.updateScript = writeScript "update-teampeak-server" ''
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl gnugrep gnused #!nix-shell -i bash -p common-updater-scripts curl gnugrep gnused jq pup
set -eu -o pipefail set -eu -o pipefail
version=$( \ version=$( \
curl -s "https://www.teamspeak.de/download/teamspeak-3-amd64-server-linux/" \ curl https://www.teamspeak.com/en/downloads/ \
| grep softwareVersion \ | pup "#server .linux .version json{}" \
| sed -E -e 's/^.*<span itemprop="softwareVersion">([^<]+)<\/span>.*$/\1/' \ | jq -r ".[0].text"
) )
versionOld=$(nix-instantiate --eval --strict -A "teamspeak_server.version") versionOld=$(nix-instantiate --eval --strict -A "teamspeak_server.version")