summaryrefslogtreecommitdiff
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
parenta09a100f2fb4bc4da9feab99ec7b9438e93f1999 (diff)
downloadopie-2eb69d489a3da0333101f608fe4e9d9296709017.zip
opie-2eb69d489a3da0333101f608fe4e9d9296709017.tar.gz
opie-2eb69d489a3da0333101f608fe4e9d9296709017.tar.bz2
update opie package
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--scripts/update/opie-update.control4
-rwxr-xr-xscripts/update/opie-update.postinst52
2 files changed, 56 insertions, 0 deletions
diff --git a/scripts/update/opie-update.control b/scripts/update/opie-update.control
new file mode 100644
index 0000000..e00debc
--- a/dev/null
+++ b/scripts/update/opie-update.control
@@ -0,0 +1,4 @@
+Maintainer: Patrick S. Vogt <tille@handhelds.org>
+Description: Reinstall opie
+Dummy package that reinstalls opie, by removing
+everything and reinstalling it.
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`