49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
fi
failed=0
(
cd "${dir}" || exit 1
rm -rf "build" "out"
if [ "${DISTCLEAN}" = "1" ]; then
rm -rf "src"
fi
if [ "${CLEANONLY}" = "1" ]; then
exit 0
fi
mkdir -p "out/${PLATFORM}" >/dev/null 2>/dev/null
./build.sh 2>&1 | tee "out/${PLATFORM}/build.log" || exit 1
) || failed=1
if [ "${failed}" = "1" ]; then
rm -rf "${dir}/out"
faileddirs="${faileddirs} ${dir}"
fi
done
# Cleanup is done at this point
if [ "${CLEANONLY}" = "1" ]; then
exit 0
fi
# Let the user know what failed to build
if [ -n "${faileddirs}" ]; then
echo "The following failed to build:${failddirs}"
fi
# Create tarfile of built packages
PLATFORM="$(./platform)"
DATECODE="$(date +%Y%m%d%H%M)"
OUTFILEBASE="tclpkgs-${PLATFORM}-${DATECODE}"
tar -cf - */out | bzip2 -9c > "${OUTFILEBASE}.tar.bz2"
|
>
|
>
>
>
>
>
>
>
|
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
fi
failed=0
(
cd "${dir}" || exit 1
rm -rf "build" "out"
rm -f failed-*.log
if [ "${DISTCLEAN}" = "1" ]; then
rm -rf "src"
fi
if [ "${CLEANONLY}" = "1" ]; then
exit 0
fi
mkdir -p "out/${PLATFORM}" >/dev/null 2>/dev/null
./build.sh > "out/${PLATFORM}/build.log" 2>&1 || exit 1
) || failed=1
if [ "${CLEANONLY}" = "0" ]; then
echo "Building ${dir}"
fi
if [ "${failed}" = "1" ]; then
cp "${dir}/out/${PLATFORM}/build.log" "${dir}/failed-${PLATFORM}-`hostname`.log"
rm -rf "${dir}/out"
faileddirs="${faileddirs} ${dir}"
echo "Failed to build ${dir}"
fi
done
# Cleanup is done at this point
if [ "${CLEANONLY}" = "1" ]; then
exit 0
fi
# Let the user know what failed to build
if [ -n "${faileddirs}" ]; then
echo "The following failed to build:${faileddirs}"
fi
# Create tarfile of built packages
PLATFORM="$(./platform)"
DATECODE="$(date +%Y%m%d%H%M)"
OUTFILEBASE="tclpkgs-${PLATFORM}-${DATECODE}"
tar -cf - */out | bzip2 -9c > "${OUTFILEBASE}.tar.bz2"
|