summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-05-15 18:22:51 +0200
committerJustin Davis <jrcd83@gmail.com>2012-05-15 18:22:51 +0200
commit3cf3fdb13e6c17c6793fc96f50a8562cc945646e (patch)
treed76c7228f88a5b0cd988011c880d56197c003c2d
parent327a2aa64dc2a386dd3fde92d9b85fdc3c9b3803 (diff)
downloadgenpkg-3cf3fdb13e6c17c6793fc96f50a8562cc945646e.tar.gz
genpkg-3cf3fdb13e6c17c6793fc96f50a8562cc945646e.tar.xz
Update pushpkgs. Use PKGDEST and REPODIR env vars.
pushpkgs hasn't been updated since I changed the destination of generated packages.
-rwxr-xr-xpushpkgs23
1 files changed, 12 insertions, 11 deletions
diff --git a/pushpkgs b/pushpkgs
index b44c1d4..1605f4f 100755
--- a/pushpkgs
+++ b/pushpkgs
@@ -21,34 +21,35 @@ syncsvn()
}
-if [ -z "$DEST" ]
+if [ -z "$REPODIR" ]
then
- echo "Specify the destination directory with the DEST env var." 1>&2
+ echo "Specify the destination directory with the REPODIR env var." 1>&2
exit 1
fi
-cd pkg || exit 1
+[ "$PKGDEST" ] || PKGDEST=~/pkg/dest
+
+cd "$PKGDEST" || exit $?
pkgdir=$(pwd)
-while [ $# -gt 0 ]
+for pkg
do
- pkg=$1 ; shift
if [ ! -d "$pkg" ]
then
echo "pkg/$pkg was not found." 1>&2
continue
fi
- echo "$DEST/$pkg"
- if [ -d "$DEST/$pkg" ]
+ echo "$REPODIR/$pkg"
+ if [ -d "$REPODIR/$pkg" ]
then
- rm -rf "$DEST/$pkg/trunk/"*
+ rm -rf "$REPODIR/$pkg/trunk/"*
fi
- mkdir -p "$DEST/$pkg/"{trunk,repos}
- cp -r -t "$DEST/$pkg/trunk" "$pkg"/*
+ mkdir -p "$REPODIR/$pkg/"{trunk,repos}
+ cp -r -t "$REPODIR/$pkg/trunk" "$pkg"/*
- cd "$DEST/$pkg/trunk"
+ cd "$REPODIR/$pkg/trunk"
prependid
syncsvn >/dev/null 2>&1