Diffstat (limited to 'scripts/update/opie-update.postinst') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | scripts/update/opie-update.postinst | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/scripts/update/opie-update.postinst b/scripts/update/opie-update.postinst new file mode 100755 index 0000000..70a5008 --- a/dev/null +++ b/scripts/update/opie-update.postinst @@ -0,0 +1,52 @@ +#!/bin/bash +# +# script to remove and reinstall opie +# +# it's free so do not sell it +# (c) patrick s. vogtp <tille@handhelds.org> + +IPKG_REMOVE="ipkg remove" +IPKG_INSTALL="ipkg install" +echo "Upating opie" +pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` + + +echo "Stopping Opie" +`/etc/init.d/qpe stop` + + +for p in $pack; do +cmd="$IPKG_REMOVE $p" +echo "$cmd" +$cmd +done + +#to be sure +pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` +while [ $pack2 != "" ] +do +for p in $pack2; do +cmd="$IPKG_REMOVE $p" +echo "$cmd" +$cmd +done +pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` +done; + +#might help +sync + + +echo "Updateing" +`ipkg update` + +for p in $pack; do +cmd="$IPKG_INSTALL $p" +echo "$cmd" +$cmd +done + +ipkg remove opie-update + +echo "Starting Opie" +`/etc/init.d/qpe start` |