summaryrefslogtreecommitdiff
path: root/scripts/update/opie-update.postinst
authortille <tille>2002-06-21 15:21:03 (UTC)
committer tille <tille>2002-06-21 15:21:03 (UTC)
commit2eb69d489a3da0333101f608fe4e9d9296709017 (patch) (side-by-side diff)
tree280c97fee4208cfbc356d39aad8b08410bd1bcad /scripts/update/opie-update.postinst
parenta09a100f2fb4bc4da9feab99ec7b9438e93f1999 (diff)
downloadopie-2eb69d489a3da0333101f608fe4e9d9296709017.zip
opie-2eb69d489a3da0333101f608fe4e9d9296709017.tar.gz
opie-2eb69d489a3da0333101f608fe4e9d9296709017.tar.bz2
update opie package
Diffstat (limited to 'scripts/update/opie-update.postinst') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/update/opie-update.postinst52
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`