author | kergoth <kergoth> | 2002-09-05 15:54:05 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-09-05 15:54:05 (UTC) |
commit | 99c55436fe50011842714eb08cc286f00f39d591 (patch) (unidiff) | |
tree | 44519426c36da516cc111ccec124c81b0e901f3c /scripts/updateipks | |
parent | 45f8f55b7ffde37733a2afd65da9e554a4970c87 (diff) | |
download | opie-99c55436fe50011842714eb08cc286f00f39d591.zip opie-99c55436fe50011842714eb08cc286f00f39d591.tar.gz opie-99c55436fe50011842714eb08cc286f00f39d591.tar.bz2 |
Making this somewhat useful.
-rwxr-xr-x | scripts/updateipks | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/scripts/updateipks b/scripts/updateipks index 3195f26..83d945b 100755 --- a/scripts/updateipks +++ b/scripts/updateipks | |||
@@ -1,29 +1,54 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | RHOST=qpe.sf.net | 3 | case "$1" in |
4 | RDIR=/home/groups/q/qp/qpe/htdocs/packages/ipaq/unstable/ | 4 | -oz) |
5 | RHOST=openzaurus.sf.net | ||
6 | RDIR=/home/groups/o/op/openzaurus/htdocs/feeds/3.0 | ||
7 | INDEXER="~/ipkg-make-index ." | ||
8 | shift | ||
9 | ;; | ||
10 | -hh.org) | ||
11 | RHOST=opie.handhelds.org | ||
12 | RDIR=/home/opie/website/html/feed/ipaq | ||
13 | INDEXER="/home/opie/ipkg-make-index ." | ||
14 | shift | ||
15 | ;; | ||
16 | -qpe) | ||
17 | RHOST=qpe.sf.net | ||
18 | RDIR=/home/groups/q/qp/qpe/htdocs/packages/ipaq/unstable | ||
19 | shift | ||
20 | ;; | ||
21 | esac | ||
22 | |||
23 | if [ -z "$RHOST" -o -z "$RDIR" ] | ||
24 | then | ||
25 | echo Error: RHOST and RDIR not set! Aborting. | ||
26 | exit | ||
27 | fi | ||
28 | |||
29 | [ -z "$INDEXER" ] && INDEXER="./mkPackages" | ||
5 | 30 | ||
6 | NEW="" | 31 | NEW="" |
7 | rm -f *.ipk | 32 | rm -f *.ipk |
8 | ssh $RHOST -C "cd $RDIR; ls *.ipk" >currentipks & | 33 | ssh $RHOST -C "cd $RDIR; ls *.ipk" >currentipks & |
9 | ./mkipks "$@" | 34 | ./mkipks "$@" |
10 | wait # for ssh | 35 | wait # for ssh |
11 | 36 | ||
12 | for i in *.ipk | 37 | for i in *.ipk |
13 | do | 38 | do |
14 | if grep -q $i currentipks | 39 | if grep -q $i currentipks |
15 | then | 40 | then |
16 | rm $i | 41 | rm $i |
17 | else | 42 | else |
18 | NEW="$NEW $i"; | 43 | NEW="$NEW $i"; |
19 | fi | 44 | fi |
20 | done | 45 | done |
21 | 46 | ||
22 | if [ -n "$NEW" ] | 47 | if [ -n "$NEW" ] |
23 | then | 48 | then |
24 | scp $NEW $RHOST:$RDIR | 49 | scp $NEW $RHOST:$RDIR |
25 | rm $NEW | 50 | rm $NEW |
26 | ssh $RHOST -C "cd $RDIR; chmod g+w *.ipk; ./mkPackages" | 51 | ssh $RHOST -C "cd $RDIR; chmod g+w *.ipk; $INDEXER" |
27 | fi | 52 | fi |
28 | 53 | ||
29 | rm currentipks | 54 | rm currentipks |