about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorSandro Jäckel2022-10-15 01:50:48 +0200
committerSandro Jäckel2022-10-25 16:12:22 +0200
commitb38799bbb4b7b01d111f814f6f741dd4bc25c563 (patch)
tree82adee6cee241ae994044e3b1a5e86a773d73759 /pkgs/applications/misc
parent0f386859f50c843c8e10a0ba1f3a6b9aa5d9a186 (diff)
ArchiSteamFarm: make update scripts indepent from where they are run, cleanups
Diffstat (limited to 'pkgs/applications/misc')
-rwxr-xr-xpkgs/applications/misc/ArchiSteamFarm/update.sh6
-rwxr-xr-xpkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh1
2 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/applications/misc/ArchiSteamFarm/update.sh b/pkgs/applications/misc/ArchiSteamFarm/update.sh
index f5e79769b3c5..86a94575164e 100755
--- a/pkgs/applications/misc/ArchiSteamFarm/update.sh
+++ b/pkgs/applications/misc/ArchiSteamFarm/update.sh
@@ -15,15 +15,13 @@ if [[ "$new_version" == "$old_version" ]]; then
   fi
 fi
 
-asf_path=$(pwd)
+asf_path=$PWD
 cd ../../../..
 
-nixpkgs_path=$(pwd)
 if [[ "${1:-}" != "--deps-only" ]]; then
     update-source-version ArchiSteamFarm "$new_version"
 fi
 
 $(nix-build -A ArchiSteamFarm.fetch-deps --no-out-link) "$deps_file"
 
-cd "$asf_path"
-./web-ui/update.sh
+exec "$asf_path/web-ui/update.sh"
diff --git a/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh b/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
index e6838148863e..8a382ee25fb4 100755
--- a/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
+++ b/pkgs/applications/misc/ArchiSteamFarm/web-ui/update.sh
@@ -2,6 +2,7 @@
 #! nix-shell -I nixpkgs=../../../../.. -i bash -p nodePackages.node2nix gnused jq curl
 set -eoux pipefail
 
+cd "$(dirname "$0")"
 pushd ../../../../..
 version=$(nix-instantiate --strict --eval -A ArchiSteamFarm.version | jq -r)
 popd