From 9bdd2fafa54d61575592c8c36979a756eb6b5c6a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 25 May 2024 12:01:13 +0200 Subject: fix(update.sh): Ensure unique variables --- update.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'update.sh') 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 -- cgit 1.4.1