summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-06-14 20:40:33 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-06-14 20:40:33 +0800
commit1ed1813d356b3289e60b2aadfcb997ef4e510efb (patch)
treeb6c46f9c71ba1ace44cd92aaeb2e4931b81d7e6b /update.sh
parent635c736432170b42cd8325f52481508fb557c0ac (diff)
update
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/update.sh b/update.sh
index 7100644..3bbf84f 100755
--- a/update.sh
+++ b/update.sh
@@ -1,3 +1,10 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
-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 -Syu --noconfirm --disable-download-timeout && flatpak update -y && notify-send -u low "Auto-Updater" "Update Successfully!" && echo \#sleep 3600 || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all
+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
+ 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 -Syu --noconfirm --disable-download-timeout && flatpak update -y && notify-send -u low "Auto-Updater" "Update Successfully!" || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all