[haiku-commits] haiku: hrev47617 - 3rdparty/mmu_man/scripts

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 4 Aug 2014 00:23:28 +0200 (CEST)

hrev47617 adds 1 changeset to branch 'master'
old head: 92d556084ca7f0e9472976a35aff6a21acf12fda
new head: 05f06a9065d9caae87bdc5ad2a99446d4ed83499
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=05f06a9+%5E92d5560

----------------------------------------------------------------------------

05f06a9: Update this script to match pkgman behaviour
  
  We don't need to move away older packages anymore.
  
  Probably not useful either to stop Deskbar,
  but let's just keep that for now.

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47617
Commit:      05f06a9065d9caae87bdc5ad2a99446d4ed83499
URL:         http://cgit.haiku-os.org/haiku/commit/?id=05f06a9
Author:      François Revol <revol@xxxxxxx>
Date:        Sun Aug  3 22:21:58 2014 UTC

----------------------------------------------------------------------------

1 file changed, 10 insertions(+), 29 deletions(-)
3rdparty/mmu_man/scripts/myupdate.sh | 39 ++++++++------------------------

----------------------------------------------------------------------------

diff --git a/3rdparty/mmu_man/scripts/myupdate.sh 
b/3rdparty/mmu_man/scripts/myupdate.sh
index 34d745c..d4057e1 100755
--- a/3rdparty/mmu_man/scripts/myupdate.sh
+++ b/3rdparty/mmu_man/scripts/myupdate.sh
@@ -17,47 +17,28 @@ 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
+       hrev_current="$(uname -v | cut -d' ' -f1)"
+       pkgman update
+       pkgman_err=$?
+       sync
+       if [ $pkgman_err -gt 0 -o "$(ls /system/packages/*_hrev*-* | grep -v 
$hrev_current)" = "" ]; then
                open /system/Deskbar < /dev/null > /dev/null 2>&1 &
                notice "Restarting Deskbar..."
-               notice "Nothing to do"
-               read
-               exit 0
+               #notice "Nothing to do"
+               read -p "Press a key..."
+               exit $pkgman_err
        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
+       sleep 5
+       #read
        exit 0
 fi
 
 rm $(finddir B_USER_SETTINGS_DIRECTORY)/boot/launch/myupdate2.sh
 
-disdir="$(finddir B_SYSTEM_PACKAGES_DIRECTORY)/disabled"
-mkdir -p "$disdir"
-
-notice "Moving old packages to disabled/ ..."
-mv $(ls /system/packages/*_hrev*-* | grep -v $(uname -v | cut -d' ' -f1)) 
$disdir/
-
-sync
-
-#notice "Adding back deskbar addons..."
-#ProcessController -deskbar
-#NetworkStatus --deskbar
-
-notice "Done"
-
-read


Other related posts:

  • » [haiku-commits] haiku: hrev47617 - 3rdparty/mmu_man/scripts - revol