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
@@ -16,7 +16,7 @@ inst_prefix=$(
16
echo $HOME
17
)
18
19
-force= with_dash= M= install= nodoc= bootstrap= branches= jobs=
19
+force= with_dash= M= install= nodoc= notest= bootstrap= branches= jobs=
20
while case "$1" in
21
--pedantic) M="$M $1" ;;
22
--locale=*) M="$M $1" ;;
@@ -24,6 +24,7 @@ while case "$1" in
24
--dash) with_dash=y ;;
25
--noinstall) install=noinstall ;;
26
--nodoc) nodoc=y ;;
27
+ --notest) notest=y ;;
28
--bootstrap) bootstrap=y ;;
29
--base=*) BUILDBASE=${1#*=} ;;
30
--branches=*) branches=${1#*=} ;;
@@ -35,7 +36,19 @@ do
36
shift
37
done
38
test -f /bin/dash || with_dash=
38
-test -n "$BUILDBASE" || BUILDBASE=$inst_prefix/buildfarm
39
+if test -z "$BUILDBASE"
40
+then
41
+ if test -d "$inst_prefix/buildfarm"
42
+ then
43
+ BUILDBASE="$inst_prefix/buildfarm"
44
+ elif test -d "../buildfarm"
45
+ then
46
+ BUILDBASE=../buildfarm
47
+ else
48
+ echo >&2 "Buildbase unknown"
49
+ exit 1
50
+ fi
51
+fi
52
test -n "$branches" || branches='next master maint pu jch'
53
test -n "$jobs" || jobs=-j2
54
@@ -97,6 +110,7 @@ do
110
*)
111
dotest=test ;;
112
esac
113
+ test -z "$notest" || dotest=
114
115
cd "$BUILDBASE/$branch"
116
git reset --hard &&