diff options
author | Sandro Jäckel | 2022-06-06 02:12:53 +0200 |
---|---|---|
committer | Sandro Jäckel | 2022-06-06 02:12:53 +0200 |
commit | 89d5ef1295b0b78d23856741ac914f8868550173 (patch) | |
tree | 408839be1dd0a6eeb814138f6e8fd06a8344fe25 /pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh | |
parent | 1841ad02a3a6ce601b39c1ad5a9a9fb8ca8c9be6 (diff) |
ArchiSteamFarm: update programm and web-ui in one run
Diffstat (limited to 'pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh')
-rwxr-xr-x | pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh | 8 |
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 |