From 2eb69d489a3da0333101f608fe4e9d9296709017 Mon Sep 17 00:00:00 2001 From: tille Date: Fri, 21 Jun 2002 15:21:03 +0000 Subject: update opie package --- (limited to 'scripts/update/opie-update.postinst') 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 + +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` -- cgit v0.9.0.2