about summary refs log tree commit diff
path: root/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
diff options
context:
space:
mode:
authorSandro Jäckel2022-06-06 02:12:53 +0200
committerSandro Jäckel2022-06-06 02:12:53 +0200
commit89d5ef1295b0b78d23856741ac914f8868550173 (patch)
tree408839be1dd0a6eeb814138f6e8fd06a8344fe25 /pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
parent1841ad02a3a6ce601b39c1ad5a9a9fb8ca8c9be6 (diff)
ArchiSteamFarm: update programm and web-ui in one run
Diffstat (limited to 'pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh')
-rwxr-xr-xpkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh b/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
index b6e72bf19cbd..90f8baf8e1b6 100755
--- a/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
+++ b/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
@@ -1,11 +1,13 @@
 #!/usr/bin/env nix-shell
-#! nix-shell -i bash -p nodePackages.node2nix gnused jq curl
+#! nix-shell -I nixpkgs=../../../.. -i bash -p nodePackages.node2nix gnused jq curl
+set -eoux pipefail
 
+pushd ../../../..
 version=$(nix-instantiate --strict --eval -A ArchiSteamFarm.version | jq -r)
+popd
+pushd "$(dirname "$0")"
 ui=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/JustArchiNET/ArchiSteamFarm/contents/ASF-ui?ref=$version" | jq -r .sha)
 
-pushd $(dirname "$0")
-
 curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package-lock.json" -o package-lock.json
 curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package.json" -o package.json