tools-uclibc/run-ppc.sh: use common code
This commit is contained in:
parent
2d9492ca73
commit
2471ba95b3
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source /etc/catalyst/catalyst.conf
|
source common.sh
|
||||||
|
|
||||||
mydate=`date +%Y%m%d`
|
|
||||||
|
|
||||||
prepare_confs() {
|
prepare_confs() {
|
||||||
local arch=$1
|
local arch=$1
|
||||||
|
@ -37,54 +35,6 @@ prepare_confs() {
|
||||||
sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf
|
sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
banner() {
|
|
||||||
cat << EOF | tee -a zzz.log > stage$1-$2-uclibc-$3.log
|
|
||||||
|
|
||||||
************************************************************************
|
|
||||||
* stage$1-$2-uclibc-$3
|
|
||||||
************************************************************************"
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
do_stages() {
|
|
||||||
local arch=$1
|
|
||||||
local flavor=$2
|
|
||||||
|
|
||||||
for s in 1 2 3; do
|
|
||||||
local tgpath="${storedir}/builds/uclibc/${flavor}/${arch}"
|
|
||||||
local target="stage${s}-${arch}-uclibc-${flavor}-${mydate}.tar.bz2"
|
|
||||||
local tglink="stage${s}-${arch}-uclibc-${flavor}.tar.bz2"
|
|
||||||
|
|
||||||
if [[ ! -f "${tgpath}/${tglink}" ]]; then
|
|
||||||
touch stage${s}-${arch}-uclibc-${flavor}.log
|
|
||||||
echo "!!! ${target} at ${tgpath} doesn't exit" \
|
|
||||||
| tee -a zzz.log \
|
|
||||||
> stage${s}-${arch}-uclibc-${flavor}.err
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
banner ${s} ${arch} ${flavor}
|
|
||||||
catalyst -f stage${s}-${arch}-uclibc-${flavor}.conf \
|
|
||||||
| tee -a zzz.log \
|
|
||||||
> stage${s}-${arch}-uclibc-${flavor}.log \
|
|
||||||
2> stage${s}-${arch}-uclibc-${flavor}.err
|
|
||||||
|
|
||||||
if [[ -f "${tgpath}/${target}" ]]; then
|
|
||||||
rm -f "${tgpath}/${tglink}"
|
|
||||||
ln -s ${target} "${tgpath}/${tglink}"
|
|
||||||
else
|
|
||||||
echo "!!! ${target} was not generated" \
|
|
||||||
| tee -a zzz.log \
|
|
||||||
>stage${s}-${arch}-uclibc-${flavor}.err
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
>zzz.log
|
>zzz.log
|
||||||
|
|
Loading…
Reference in a new issue