diff options
author | Justin Davis <jrcd83@gmail.com> | 2011-10-07 21:59:39 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2011-10-07 21:59:39 +0200 |
commit | edebea3bc55bed55522c5c5d419e9d80831d912a (patch) | |
tree | b1e63cb4b7a57e344fcc3c2a5c8a7633ef6ce21c | |
parent | 2fe258beb84c7e19e15af0818b1e9d84ca7e8f9b (diff) | |
download | genpkg-edebea3bc55bed55522c5c5d419e9d80831d912a.tar.gz genpkg-edebea3bc55bed55522c5c5d419e9d80831d912a.tar.xz |
Tweak style in pushpkgs. Use sed for prepending $Id$.
-rwxr-xr-x | pushpkgs | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -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 |