-rwxr-xr-x | scripts/updateipks | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/updateipks b/scripts/updateipks new file mode 100755 index 0000000..3195f26 --- a/dev/null +++ b/scripts/updateipks | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | RHOST=qpe.sf.net | ||
4 | RDIR=/home/groups/q/qp/qpe/htdocs/packages/ipaq/unstable/ | ||
5 | |||
6 | NEW="" | ||
7 | rm -f *.ipk | ||
8 | ssh $RHOST -C "cd $RDIR; ls *.ipk" >currentipks & | ||
9 | ./mkipks "$@" | ||
10 | wait # for ssh | ||
11 | |||
12 | for i in *.ipk | ||
13 | do | ||
14 | if grep -q $i currentipks | ||
15 | then | ||
16 | rm $i | ||
17 | else | ||
18 | NEW="$NEW $i"; | ||
19 | fi | ||
20 | done | ||
21 | |||
22 | if [ -n "$NEW" ] | ||
23 | then | ||
24 | scp $NEW $RHOST:$RDIR | ||
25 | rm $NEW | ||
26 | ssh $RHOST -C "cd $RDIR; chmod g+w *.ipk; ./mkPackages" | ||
27 | fi | ||
28 | |||
29 | rm currentipks | ||