about summary refs log tree commit diff stats
path: root/update.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-25 12:01:13 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-25 12:01:13 +0200
commit9bdd2fafa54d61575592c8c36979a756eb6b5c6a (patch)
tree62f4c0c1ba4f6fb896e2baf86212f53c5c9714aa /update.sh
parentfix(treewide): Use `nixVersions.latest` instead of just `nix` (diff)
downloadnixos-config-9bdd2fafa54d61575592c8c36979a756eb6b5c6a.tar.gz
nixos-config-9bdd2fafa54d61575592c8c36979a756eb6b5c6a.zip
fix(update.sh): Ensure unique variables
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh18
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