myupdate: Close and restart Deskbar on update
Close Deskbar before trying to update and restart it afterward. This way the addons are restored as they were before.
This commit is contained in:
Vendored
+14
-4
@@ -13,20 +13,31 @@ notice () {
|
||||
}
|
||||
|
||||
if [ "$1" != "-2" ]; then
|
||||
|
||||
notice "Closing Deskbar..."
|
||||
notice "Checking for updates..."
|
||||
quit application/x-vnd.Be-TSKB
|
||||
#notice "Checking for updates..."
|
||||
pkgman update || exit $?
|
||||
sync
|
||||
if [ "$(ls /system/packages/*_hrev*-* | grep -v $(uname -v | cut -d' ' -f1))" = "" ]; then
|
||||
open /system/Deskbar < /dev/null > /dev/null 2>&1 &
|
||||
notice "Restarting Deskbar..."
|
||||
notice "Nothing to do"
|
||||
read
|
||||
exit 0
|
||||
fi
|
||||
makebootable /boot
|
||||
sync
|
||||
cat > $(finddir B_USER_SETTINGS_DIRECTORY)/boot/launch/myupdate2.sh << EOF
|
||||
#!/bin/sh
|
||||
cd "$PWD"
|
||||
$0 -2
|
||||
EOF
|
||||
chmod +x $(finddir B_USER_SETTINGS_DIRECTORY)/boot/launch/myupdate2.sh
|
||||
sync
|
||||
notice "Restarting Deskbar..."
|
||||
/system/Deskbar < /dev/null > /dev/null 2>&1 &
|
||||
notice "You should reboot now..."
|
||||
shutdown -r -a
|
||||
read
|
||||
@@ -43,10 +54,9 @@ mv $(ls /system/packages/*_hrev*-* | grep -v $(uname -v | cut -d' ' -f1)) $disdi
|
||||
|
||||
sync
|
||||
|
||||
notice "Adding back deskbar addons..."
|
||||
|
||||
ProcessController -deskbar
|
||||
NetworkStatus --deskbar
|
||||
#notice "Adding back deskbar addons..."
|
||||
#ProcessController -deskbar
|
||||
#NetworkStatus --deskbar
|
||||
|
||||
notice "Done"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user