4 |
exit 1 |
exit 1 |
5 |
} |
} |
6 |
|
|
7 |
|
os-arch() |
8 |
|
{ |
9 |
|
local arch="$1" |
10 |
|
local os_arch |
11 |
|
|
12 |
|
case ${arch} in |
13 |
|
i*86|x86_64) os_arch="${arch}" ;; |
14 |
|
src|playground*) os_arch="$(source ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc; echo ${ARCH})";; |
15 |
|
esac |
16 |
|
|
17 |
|
echo "${os_arch}" |
18 |
|
} |
19 |
|
|
20 |
runarch-script() |
runarch-script() |
21 |
{ |
{ |
22 |
local arch="$1" |
local arch="$1" |
92 |
# never fail |
# never fail |
93 |
return 0 |
return 0 |
94 |
} |
} |
95 |
|
|
96 |
|
enum-build-arch-types() |
97 |
|
{ |
98 |
|
echo "${BUILD_ARCH[*]}" |
99 |
|
} |
100 |
|
|
101 |
|
enum-all-arch-types() |
102 |
|
{ |
103 |
|
local arch |
104 |
|
local build_arch_types |
105 |
|
|
106 |
|
for arch in src ${BUILD_ARCH[*]} |
107 |
|
do |
108 |
|
if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc ] |
109 |
|
then |
110 |
|
echo "Warning: mage.rc of '${arch}' not found. Arch '${arch}' ignored." >&2 |
111 |
|
else |
112 |
|
build_arch_types+=( "${arch}" ) |
113 |
|
fi |
114 |
|
done |
115 |
|
|
116 |
|
if [[ ${BUILD_PLAYGROUND} -eq 1 ]] |
117 |
|
then |
118 |
|
for arch in ${BUILD_ARCH[*]} |
119 |
|
do |
120 |
|
if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/playground-${arch}/mage.rc ] |
121 |
|
then |
122 |
|
echo "Warning: mage.rc of 'playground-${arch}' not found. Arch 'playground-${arch}' ignored." >&2 |
123 |
|
else |
124 |
|
build_arch_types+=( "playground-${arch}" ) |
125 |
|
fi |
126 |
|
done |
127 |
|
fi |
128 |
|
|
129 |
|
echo "${build_arch_types[*]}" |
130 |
|
} |