diff options
author | Justin Davis <jrcd83@gmail.com> | 2011-09-12 21:31:01 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2011-09-12 21:31:01 +0200 |
commit | 3af5c25e52fdf437ecc7b527278ec190107af113 (patch) | |
tree | 9ebe5bea73efa22d6c46c3bd178c53db213d9c0a /pushpkgs | |
parent | 7fd5757ea5702824bd987dc73ca1b204a31d4dd1 (diff) | |
download | genpkg-3af5c25e52fdf437ecc7b527278ec190107af113.tar.gz genpkg-3af5c25e52fdf437ecc7b527278ec190107af113.tar.xz |
Add SVN $Id$ tagging to pushpkgs script.
Diffstat (limited to 'pushpkgs')
-rwxr-xr-x | pushpkgs | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -1,11 +1,28 @@ #!/bin/sh +prependid() +{ + awk '!/^#/ && ! done { print "# $Id$"; done = 1 } 1' PKGBUILD \ + > PKGBUILD.new + mv PKGBUILD.new PKGBUILD +} + +# Make sure that the package directories are added to the SVN repo. +syncsvn() +{ + svn add --parents PKGBUILD ../repos + # Make sure that the Id keyword-property is active. + svn propset svn:keywords Id PKGBUILD +} + + if [ -z "$DEST" ] ; then echo "Specify the destination directory with the DEST env var." 1>&2 exit 1 fi cd pkg || exit 1 +pkgdir=$(pwd) while [ $# -gt 0 ] ; do pkg=$1 ; shift @@ -22,12 +39,9 @@ while [ $# -gt 0 ] ; do mkdir -p "$DEST/$pkg/"{trunk,repos} cp -r -t "$DEST/$pkg/trunk" "$pkg"/* - # Add an SVN $Id$ comment at the end of the comments header cd "$DEST/$pkg/trunk" - awk '!/^#/ && ! done { print "# $Id$"; done = 1 } 1' PKGBUILD \ - > PKGBUILD.new - mv PKGBUILD.new PKGBUILD + prependid + syncsvn >/dev/null 2>&1 - # Make sure it is used. - svn propset svn:keywords Id PKGBUILD + cd "$pkgdir" done |