author | tille <tille> | 2002-06-21 15:21:03 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-21 15:21:03 (UTC) |
commit | 2eb69d489a3da0333101f608fe4e9d9296709017 (patch) (unidiff) | |
tree | 280c97fee4208cfbc356d39aad8b08410bd1bcad /scripts | |
parent | a09a100f2fb4bc4da9feab99ec7b9438e93f1999 (diff) | |
download | opie-2eb69d489a3da0333101f608fe4e9d9296709017.zip opie-2eb69d489a3da0333101f608fe4e9d9296709017.tar.gz opie-2eb69d489a3da0333101f608fe4e9d9296709017.tar.bz2 |
update opie package
-rw-r--r-- | scripts/update/opie-update.control | 4 | ||||
-rwxr-xr-x | scripts/update/opie-update.postinst | 52 |
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 @@ | |||
1 | Maintainer: Patrick S. Vogt <tille@handhelds.org> | ||
2 | Description: Reinstall opie | ||
3 | Dummy package that reinstalls opie, by removing | ||
4 | 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 @@ | |||
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 | |||
8 | IPKG_REMOVE="ipkg remove" | ||
9 | IPKG_INSTALL="ipkg install" | ||
10 | echo "Upating opie" | ||
11 | pack=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | ||
12 | |||
13 | |||
14 | echo "Stopping Opie" | ||
15 | `/etc/init.d/qpe stop` | ||
16 | |||
17 | |||
18 | for p in $pack; do | ||
19 | cmd="$IPKG_REMOVE $p" | ||
20 | echo "$cmd" | ||
21 | $cmd | ||
22 | done | ||
23 | |||
24 | #to be sure | ||
25 | pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | ||
26 | while [ $pack2 != "" ] | ||
27 | do | ||
28 | for p in $pack2; do | ||
29 | cmd="$IPKG_REMOVE $p" | ||
30 | echo "$cmd" | ||
31 | $cmd | ||
32 | done | ||
33 | pack2=`ipkg status | grep Package | grep -i opie | sed "s/Package://"` | ||
34 | done; | ||
35 | |||
36 | #might help | ||
37 | sync | ||
38 | |||
39 | |||
40 | echo "Updateing" | ||
41 | `ipkg update` | ||
42 | |||
43 | for p in $pack; do | ||
44 | cmd="$IPKG_INSTALL $p" | ||
45 | echo "$cmd" | ||
46 | $cmd | ||
47 | done | ||
48 | |||
49 | ipkg remove opie-update | ||
50 | |||
51 | echo "Starting Opie" | ||
52 | `/etc/init.d/qpe start` | ||