diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-04-08 05:52:55 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-04-08 05:52:55 +0200 |
commit | 4bc106f1a60a6172b707bfaee5aff5030234466e (patch) | |
tree | 95e3ff179162665274e0ca212b9b4c8f258201c1 /updatesync-many | |
parent | 29a77254307e42ba0959fe7660aa3d0d76285e6a (diff) | |
download | dbscripts-4bc106f1a60a6172b707bfaee5aff5030234466e.tar.gz dbscripts-4bc106f1a60a6172b707bfaee5aff5030234466e.tar.xz |
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 <aaronmgriffin@gmail.com>
Diffstat (limited to 'updatesync-many')
-rwxr-xr-x | updatesync-many | 16 |
1 files changed, 7 insertions, 9 deletions
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 <action> <dbfile> <abs_dir>" + echo "usage: $0 <action> <dbfile> <svn_checkout> <repo_tag>" 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 |