Skip to content

Commit 8339e55

Browse files
committed
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.
1 parent c6eb876 commit 8339e55

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Dothem

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ inst_prefix=$(
1616
echo $HOME
1717
)
1818

19-
force= with_dash= M= install= nodoc= bootstrap= branches= jobs=
19+
force= with_dash= M= install= nodoc= notest= bootstrap= branches= jobs=
2020
while case "$1" in
2121
--pedantic) M="$M $1" ;;
2222
--locale=*) M="$M $1" ;;
2323
--force) force=$1 ;;
2424
--dash) with_dash=y ;;
2525
--noinstall) install=noinstall ;;
2626
--nodoc) nodoc=y ;;
27+
--notest) notest=y ;;
2728
--bootstrap) bootstrap=y ;;
2829
--base=*) BUILDBASE=${1#*=} ;;
2930
--branches=*) branches=${1#*=} ;;
@@ -35,7 +36,19 @@ do
3536
shift
3637
done
3738
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
3952
test -n "$branches" || branches='next master maint pu jch'
4053
test -n "$jobs" || jobs=-j2
4154

@@ -97,6 +110,7 @@ do
97110
*)
98111
dotest=test ;;
99112
esac
113+
test -z "$notest" || dotest=
100114

101115
cd "$BUILDBASE/$branch"
102116
git reset --hard &&

0 commit comments

Comments
 (0)