Meta/Dothem: support multi-arch $HOME directory better

This can use the layout that has buildfarm under $HOME/g/$arch/buildfarm and the layout that has it ../buildfarm, relative to the git tree. The maintainer's home machines (and virtual ones) will use the former, while the k.org machine will use the latter layout.

Junio C Hamano committed Apr 26, 2009 at 19:49 UTC 8339e55e1d147d026a3664776ea0a1291ec09827
1 file changed +16 -2
Dothem
+16 -2
index 2a0ec01347..20b204d74a 100755 --- a/Dothem +++ b/Dothem @@ -16,7 +16,7 @@ inst_prefix=$( echo $HOME ) -force= with_dash= M= install= nodoc= bootstrap= branches= jobs= +force= with_dash= M= install= nodoc= notest= bootstrap= branches= jobs= while case "$1" in --pedantic) M="$M $1" ;; --locale=*) M="$M $1" ;; @@ -24,6 +24,7 @@ while case "$1" in --dash) with_dash=y ;; --noinstall) install=noinstall ;; --nodoc) nodoc=y ;; + --notest) notest=y ;; --bootstrap) bootstrap=y ;; --base=*) BUILDBASE=${1#*=} ;; --branches=*) branches=${1#*=} ;; @@ -35,7 +36,19 @@ do shift done test -f /bin/dash || with_dash= -test -n "$BUILDBASE" || BUILDBASE=$inst_prefix/buildfarm +if test -z "$BUILDBASE" +then + if test -d "$inst_prefix/buildfarm" + then + BUILDBASE="$inst_prefix/buildfarm" + elif test -d "../buildfarm" + then + BUILDBASE=../buildfarm + else + echo >&2 "Buildbase unknown" + exit 1 + fi +fi test -n "$branches" || branches='next master maint pu jch' test -n "$jobs" || jobs=-j2 @@ -97,6 +110,7 @@ do *) dotest=test ;; esac + test -z "$notest" || dotest= cd "$BUILDBASE/$branch" git reset --hard &&