summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-08-30 19:43:43 +0200
committerJustin Davis <jrcd83@gmail.com>2011-08-30 19:43:43 +0200
commit7215ecc267adb311acc09c093e4937632ca4bf7e (patch)
tree7e961ca7cad1c21ab58df7eac3bff2307d7dd3be
parent7aa61d38e1f5a1d4f38296f29ef4847e471294c2 (diff)
downloadgenpkg-7215ecc267adb311acc09c093e4937632ca4bf7e.tar.gz
genpkg-7215ecc267adb311acc09c093e4937632ca4bf7e.tar.xz
Add pushpkgs helper script.
-rwxr-xr-xpushpkgs25
1 files changed, 25 insertions, 0 deletions
diff --git a/pushpkgs b/pushpkgs
new file mode 100755
index 0000000..d6ec733
--- /dev/null
+++ b/pushpkgs
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ -z "$DEST" ] ; then
+ echo "Specify the destination directory with the DEST env var." 1>&2
+ exit 1
+fi
+
+cd pkg || exit 1
+
+while [ $# -gt 0 ] ; 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" ] ; then
+ rm -rf "$DEST/$pkg/trunk/"*
+ fi
+
+ mkdir -p "$DEST/$pkg/"{trunk,repos}
+ cp -r -t "$DEST/$pkg/trunk" "$pkg"/*
+done
+