2014-07-14 17:11:35 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-08-17 12:18:47 +00:00
|
|
|
source common.sh
|
2014-07-14 17:11:35 +00:00
|
|
|
|
|
|
|
prepare_confs() {
|
|
|
|
local arch=$1
|
|
|
|
local flavor=$2
|
|
|
|
|
|
|
|
for s in 1 2 3; do
|
|
|
|
|
|
|
|
local cstage=stage${s}
|
|
|
|
local p=$(( s - 1 ))
|
|
|
|
[[ $p == 0 ]] && p=3
|
|
|
|
local pstage=stage${p}
|
|
|
|
|
2019-06-17 00:14:24 +00:00
|
|
|
local parch="powerpc/ppc32"
|
|
|
|
local tarch="powerpc"
|
2014-08-17 12:14:15 +00:00
|
|
|
local profile=${flavor}
|
2019-06-17 00:14:24 +00:00
|
|
|
[[ "${flavor}" == "vanilla" ]] && profile="" || profile="/hardened"
|
2014-08-17 12:14:15 +00:00
|
|
|
|
2019-06-17 00:14:24 +00:00
|
|
|
cat stage.conf.template | \
|
2014-07-14 17:11:35 +00:00
|
|
|
sed -e "s:\(^version_stamp.*$\):\1-${mydate}:" \
|
|
|
|
-e "s:CSTAGE:${cstage}:g" \
|
|
|
|
-e "s:PSTAGE:${pstage}:g" \
|
|
|
|
-e "s:SARCH:${arch}:g" \
|
|
|
|
-e "s:PARCH:${parch}:g" \
|
2019-06-17 00:14:24 +00:00
|
|
|
-e "s:TARCHPROFILE:${profile}:g" \
|
2014-07-14 17:11:35 +00:00
|
|
|
-e "s:TARCH:${tarch}:g" \
|
|
|
|
-e "s:FLAVOR:${flavor}:g" \
|
2014-08-17 12:14:15 +00:00
|
|
|
-e "s:PROFILE:${profile}:g" \
|
2014-07-14 17:11:35 +00:00
|
|
|
-e "s:MYCATALYST:$(pwd):g" \
|
|
|
|
> stage${s}-${arch}-uclibc-${flavor}.conf
|
|
|
|
done
|
|
|
|
|
|
|
|
sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
main() {
|
|
|
|
>zzz.log
|
|
|
|
|
|
|
|
catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err
|
|
|
|
|
|
|
|
for arch in ppc; do
|
|
|
|
for flavor in hardened vanilla; do
|
|
|
|
prepare_confs ${arch} ${flavor}
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
2014-07-15 23:14:22 +00:00
|
|
|
for arch in ppc; do
|
|
|
|
# hardened is currently broken
|
2014-07-14 17:11:35 +00:00
|
|
|
# for flavor in hardened vanilla; do
|
2014-07-15 23:14:22 +00:00
|
|
|
for flavor in vanilla; do
|
|
|
|
do_stages ${arch} ${flavor}
|
|
|
|
ret=$?
|
|
|
|
if [[ $? == 1 ]]; then
|
|
|
|
echo "FAILURE at ${arch} ${flavor} " | tee zzz.log
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
2014-07-14 17:11:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main $1 &
|