summaryrefslogtreecommitdiffstats
path: root/pushpkgs
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-10-07 22:57:09 +0200
committerJustin Davis <jrcd83@gmail.com>2011-10-07 22:57:09 +0200
commitd6ded7530af05fec2e19bc22487b14b8bd8cb291 (patch)
treee709b6f24b6aaf8b9b0e4d485b7126ad480aa74d /pushpkgs
parentb555cb49f09a3af22f75281f1937ab41f4f90614 (diff)
parentedebea3bc55bed55522c5c5d419e9d80831d912a (diff)
downloadgenpkg-d6ded7530af05fec2e19bc22487b14b8bd8cb291.tar.gz
genpkg-d6ded7530af05fec2e19bc22487b14b8bd8cb291.tar.xz
Merge branch 'master' of github.com:juster/pbjam
Diffstat (limited to 'pushpkgs')
-rwxr-xr-xpushpkgs21
1 files changed, 15 insertions, 6 deletions
diff --git a/pushpkgs b/pushpkgs
index 3463c67..b44c1d4 100755
--- a/pushpkgs
+++ b/pushpkgs
@@ -2,8 +2,13 @@
prependid()
{
- awk '!/^#/ && ! done { print "# $Id$"; done = 1 } 1' PKGBUILD \
- > PKGBUILD.new
+ sed -e '/^#/!{
+ i\
+\# $Id$
+ :loop
+ n
+ b loop
+ }' PKGBUILD >PKGBUILD.new
mv PKGBUILD.new PKGBUILD
}
@@ -16,7 +21,8 @@ syncsvn()
}
-if [ -z "$DEST" ] ; then
+if [ -z "$DEST" ]
+then
echo "Specify the destination directory with the DEST env var." 1>&2
exit 1
fi
@@ -24,15 +30,18 @@ fi
cd pkg || exit 1
pkgdir=$(pwd)
-while [ $# -gt 0 ] ; do
+while [ $# -gt 0 ]
+do
pkg=$1 ; shift
- if [ ! -d "$pkg" ] ; then
+ if [ ! -d "$pkg" ]
+ then
echo "pkg/$pkg was not found." 1>&2
continue
fi
echo "$DEST/$pkg"
- if [ -d "$DEST/$pkg" ] ; then
+ if [ -d "$DEST/$pkg" ]
+ then
rm -rf "$DEST/$pkg/trunk/"*
fi