From 3af5c25e52fdf437ecc7b527278ec190107af113 Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Mon, 12 Sep 2011 15:31:01 -0400 Subject: Add SVN $Id$ tagging to pushpkgs script. --- pushpkgs | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'pushpkgs') diff --git a/pushpkgs b/pushpkgs index 0e7e6f9..ff00c11 100755 --- a/pushpkgs +++ b/pushpkgs @@ -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 -- cgit v1.2.3-24-g4f1b