about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xsys/nixpkgs/pkgs/comments/update.sh3
-rwxr-xr-xsys/nixpkgs/pkgs/update_pkgs13
-rwxr-xr-xsys/nixpkgs/pkgs/yt/update.sh3
-rwxr-xr-xupdate.sh2
4 files changed, 10 insertions, 11 deletions
diff --git a/sys/nixpkgs/pkgs/comments/update.sh b/sys/nixpkgs/pkgs/comments/update.sh
index 2529167c..26a7aeac 100755
--- a/sys/nixpkgs/pkgs/comments/update.sh
+++ b/sys/nixpkgs/pkgs/comments/update.sh
@@ -1,6 +1,7 @@
 #!/usr/bin/env sh
 
-cargo update && cargo upgrade
+cargo update
 
+[ "$1" = "upgrade" ] && cargo upgrade
 
 # vim: ft=sh
diff --git a/sys/nixpkgs/pkgs/update_pkgs b/sys/nixpkgs/pkgs/update_pkgs
index d6684f06..8392fb1c 100755
--- a/sys/nixpkgs/pkgs/update_pkgs
+++ b/sys/nixpkgs/pkgs/update_pkgs
@@ -12,16 +12,13 @@ fd . --type directory --max-depth 1 | while read -r dir; do
     cd "$dir" || die "Dir '$dir' does not exist"
 
     if [ -f update.sh ]; then
-        printf "\033[34;1m> \033[0m%s" "\033[32;1mRunning '${dir}update.sh'\033[0m";
+        printf "\033[34;1m> \033[0m\033[34;1m%s\033[0m\n" "Running '${dir}update.sh'";
 
-        if [ -f flake.nix ]; then
-            nix flake update
+        [ -f flake.nix ] && nix flake update
 
-            direnv allow
-            eval "$(direnv export bash)"
-        fi
-
-        ./update.sh
+        direnv allow
+        eval "$(direnv export bash 2>/dev/null)"
+        ./update.sh "$@"
     fi
     cd - > /dev/null || die "Bug: Last dir does not exist"
 done
diff --git a/sys/nixpkgs/pkgs/yt/update.sh b/sys/nixpkgs/pkgs/yt/update.sh
index 2529167c..2e59aa60 100755
--- a/sys/nixpkgs/pkgs/yt/update.sh
+++ b/sys/nixpkgs/pkgs/yt/update.sh
@@ -1,6 +1,7 @@
 #!/usr/bin/env sh
 
-cargo update && cargo upgrade
+cargo update
+[ "$1" = "upgrade" ] && cargo upgrade
 
 
 # vim: ft=sh
diff --git a/update.sh b/update.sh
index a08f27ec..6f8a65c1 100755
--- a/update.sh
+++ b/update.sh
@@ -3,4 +3,4 @@
 
 ./hm/soispha/conf/firefox/scripts/update_extensions
 
-./sys/nixpkgs/pkgs/update_pkgs
+./sys/nixpkgs/pkgs/update_pkgs "$@"