summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-07-23 09:14:34 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-07-23 09:14:34 +0800
commit9b8128a9342500fa4dd43331bd2eb6c8b4ed9b07 (patch)
treeadda4f289032db1e3847b766112e83a5141116f3 /update.sh
parentb8aa6b6a516ac4ae5a104d7de96f31ced7f16d55 (diff)
updated
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/update.sh b/update.sh
index ce0b676..51b0d5d 100755
--- a/update.sh
+++ b/update.sh
@@ -4,7 +4,10 @@ if [ -f /var/lib/pacman/db.lck ]; then
notify-send "db.lck exist, waiting 1 min until rm -f"
sleep 60
if [ -f /var/lib/pacman/db.lck ]; then
+ notify-send "db.lck still exist, forcfully removing..."
sudo rm -f /var/lib/pacman/db.lck
fi
fi
-notify-send "Auto-Updater" "Update in progress, please don't poweroff the computer" && sudo npm update -g & nix-env -u & brew update & yay -Sl > /tmp/yaySl & yay -Ss > /tmp/yaySs & yay -Syu --noconfirm --disable-download-timeout && notify-send -u low "Auto-Updater" "Update Successfully!" || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all
+
+sudo npm update -g & nix-env -u & brew update & blck=$! & yay -Sl > /tmp/yaySl & yay -Ss > /tmp/yaySs & yay --noconfirm --disable-download-timeout & wait "$blck" && brew upgrade || sudo touch /var/lock/updatefail.lock # notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all
+#notify-send "Auto-Updater" "Update in progress, please don't poweroff the computer" && sudo npm update -g & nix-env -u & brew update & brew upgrade & yay -Sl > /tmp/yaySl & yay -Ss > /tmp/yaySs & yay -Syu --noconfirm --disable-download-timeout && notify-send -u low "Auto-Updater" "Update Successfully!" || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all