From 4bc106f1a60a6172b707bfaee5aff5030234466e Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 7 Apr 2008 22:52:55 -0500 Subject: Giant SVN changes Some other fun stuff snuck in there, like indentation changes, but this should get us mostly working under SVN, and at least allow us to build DB files at the very least Signed-off-by: Aaron Griffin --- updatesync-many | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'updatesync-many') diff --git a/updatesync-many b/updatesync-many index 40c5e4d..8060585 100755 --- a/updatesync-many +++ b/updatesync-many @@ -23,13 +23,13 @@ usage() { echo "updatesync-many" - echo "usage: $0 " + echo "usage: $0 " echo echo "This should probably only be run from the Arch db-generation scripts" echo echo "Caveats:" echo " - Make sure you run it from the staging directory" - echo " - Use absolute pathnames for dbfile and abs_dir" + echo " - Use absolute pathnames for dbfile and svn_checkout" echo exit 0 } @@ -167,17 +167,14 @@ update_entry() pkgfile=$1 pkgname=$(getpkgname ${pkgfile}) fullname=$(basename ${pkgfile}) + pkgpath="$SVNCO/$pkgname/repos/$REPOTAG" # find the matching PKGBUILD - tmpf=$(mktemp /tmp/updatesync-many.XXXXXXXXXX) || exit 1 - find $ABSDIR -type d -name "$pkgname" >$tmpf - if [ "`cat $tmpf | wc -l`" != "1" ]; then + if [ ! -d "$pkgpath" ]; then msg "WARNING: could not find PKGBUILD for $pkgname, cannot update this entry" - rm $tmpf return fi - pkgbuild="`cat $tmpf`/PKGBUILD" - rm $tmpf + pkgbuild="${pkgpath}/PKGBUILD" if [ ! -f $pkgbuild ]; then msg "WARNING: could not find PKGBUILD for $fullname, cannot update this entry" return @@ -218,7 +215,8 @@ fi ACTION=$1 PKGDB=$2 -ABSDIR=$3 +SVNCO=$3 +REPOTAG=$4 STAGEDIR="`pwd`" PKGDIR="`dirname $PKGDB`" if [ "$PKGDIR" = "." ]; then -- cgit v1.2.3-24-g4f1b