diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-25 12:01:13 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-25 12:01:13 +0200 |
commit | 9bdd2fafa54d61575592c8c36979a756eb6b5c6a (patch) | |
tree | 62f4c0c1ba4f6fb896e2baf86212f53c5c9714aa /update.sh | |
parent | fix(treewide): Use `nixVersions.latest` instead of just `nix` (diff) | |
download | nixos-config-9bdd2fafa54d61575592c8c36979a756eb6b5c6a.tar.gz nixos-config-9bdd2fafa54d61575592c8c36979a756eb6b5c6a.zip |
fix(update.sh): Ensure unique variables
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/update.sh b/update.sh index 631c9d75..c96f4482 100755 --- a/update.sh +++ b/update.sh @@ -1,17 +1,17 @@ #!/usr/bin/env sh -run() { - printf "\033[35;1m> \033[0m\033[35;1m%s\033[0m\n" "Running $(basename "$1") .." - - cmd="$1"; +__update_sh_run() { + __update_sh_command="$1"; shift 1 - "$cmd" "$@" -} + printf "\033[35;1m> \033[0m\033[35;1m%s\033[0m\n" "Running '$(basename "$__update_sh_command")' .." -run ./modules/home/conf/firefox/scripts/update_extensions.sh + "$__update_sh_command" "$@" -run ./pkgs/update_pkgs.sh "$@" + unset __update_sh_command +} -run ./modules/system/secrets/update_secrets.sh +__update_sh_run ./modules/home/conf/firefox/scripts/update_extensions.sh "$@" +__update_sh_run ./pkgs/update_pkgs.sh "$@" +__update_sh_run ./modules/system/secrets/update_secrets.sh "$@" # vim: ft=sh |