maui/contrib/copyfiles
dev 9a0042c61e Initial revision
git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@2 3f5042e3-fb1d-0410-be18-d6ca2573e517
2005-07-12 21:12:53 +00:00

36 lines
610 B
Bash
Executable File

#!/bin/sh
# usage copyfiles PKG VERSION PATCH ACTION
export SERVER=kahu
export DDIR=/var/www/html/cri/downloads
export NOW=`/bin/date +%s`
export PKG=$1
export DIST=$2
export VERSION=$DIST$3
export SRC=$4
export ACTION=$5
export DIR=$DDIR/$PKG
export EDIR=$DDIR/e$PKG
export SNAP=$DIR/temp/$PKG-$VERSION-snap.$NOW.tar.gz
export ESNAP=$EDIR/temp/$PKG-$VERSION-snap.$NOW.tar.gz
export DIST=$DIR/$PKG-$VERSION.tar.gz
export EDIST=$EDIR/$PKG-$VERSION.tar.gz
cp $SRC /usr/local/dev/dist
case "$ACTION" in
all)
scp $SRC $SERVER:$SNAP
scp $SRC $SERVER:$DIST
;;
snap)
scp $SRC $SERVER:$SNAP
;;
*)
;;
esac