summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore 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 @@
1Maintainer: Patrick S. Vogt <tille@handhelds.org>
2Description: Reinstall opie
3Dummy package that reinstalls opie, by removing
4everything 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 @@
1#!/bin/bash
2#
3# script to remove and reinstall opie
4#
5# it's free so do not sell it
6# (c) patrick s. vogtp <tille@handhelds.org>
7
8IPKG_REMOVE="ipkg remove"
9IPKG_INSTALL="ipkg install"
10echo "Upating opie"
11pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"`
12
13
14echo "Stopping Opie"
15`/etc/init.d/qpe stop`
16
17
18for p in $pack; do
19cmd="$IPKG_REMOVE $p"
20echo "$cmd"
21$cmd
22done
23
24#to be sure
25pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"`
26while [ $pack2 != "" ]
27do
28for p in $pack2; do
29cmd="$IPKG_REMOVE $p"
30echo "$cmd"
31$cmd
32done
33pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"`
34done;
35
36#might help
37sync
38
39
40echo "Updateing"
41`ipkg update`
42
43for p in $pack; do
44cmd="$IPKG_INSTALL $p"
45echo "$cmd"
46$cmd
47done
48
49ipkg remove opie-update
50
51echo "Starting Opie"
52`/etc/init.d/qpe start`