summaryrefslogtreecommitdiff
path: root/scripts/updateipks
Side-by-side diff
Diffstat (limited to 'scripts/updateipks') (more/less context) (show whitespace changes)
-rwxr-xr-xscripts/updateipks29
1 files changed, 27 insertions, 2 deletions
diff --git a/scripts/updateipks b/scripts/updateipks
index 3195f26..83d945b 100755
--- a/scripts/updateipks
+++ b/scripts/updateipks
@@ -1,12 +1,37 @@
#!/bin/sh
+case "$1" in
+-oz)
+ RHOST=openzaurus.sf.net
+ RDIR=/home/groups/o/op/openzaurus/htdocs/feeds/3.0
+ INDEXER="~/ipkg-make-index ."
+ shift
+ ;;
+-hh.org)
+ RHOST=opie.handhelds.org
+ RDIR=/home/opie/website/html/feed/ipaq
+ INDEXER="/home/opie/ipkg-make-index ."
+ shift
+ ;;
+-qpe)
RHOST=qpe.sf.net
-RDIR=/home/groups/q/qp/qpe/htdocs/packages/ipaq/unstable/
+ RDIR=/home/groups/q/qp/qpe/htdocs/packages/ipaq/unstable
+ shift
+ ;;
+esac
+
+if [ -z "$RHOST" -o -z "$RDIR" ]
+then
+ echo Error: RHOST and RDIR not set! Aborting.
+ exit
+fi
+
+[ -z "$INDEXER" ] && INDEXER="./mkPackages"
NEW=""
rm -f *.ipk
ssh $RHOST -C "cd $RDIR; ls *.ipk" >currentipks &
./mkipks "$@"
wait # for ssh
for i in *.ipk
@@ -18,12 +43,12 @@ do
NEW="$NEW $i";
fi
done
if [ -n "$NEW" ]
then
scp $NEW $RHOST:$RDIR
rm $NEW
- ssh $RHOST -C "cd $RDIR; chmod g+w *.ipk; ./mkPackages"
+ ssh $RHOST -C "cd $RDIR; chmod g+w *.ipk; $INDEXER"
fi
rm currentipks