30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
+
+
+
+
-
+
+
-
+
|
fi
done
)
if [ -z "${TCLCONFIGDIR}" ]; then
TCLCONFIGDIR="/usr/lib"
fi
export TCLCONFIGDIR
# Determine platform
PLATFORM="$(./platform)"
export PLATFORM
# Build all appropriate directories
faileddirs=""
for dir in */; do
export dir
if [ ! -f "${dir}/build.sh" ]; then
continue
fi
failed=0
(
cd "${dir}" || exit 1
rm -f "build.log"
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 "build.log" || exit 1
./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
|
76
77
78
79
80
81
82
83
84
85
|
81
82
83
84
85
86
87
88
89
90
|
-
+
|
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 */build.log | bzip2 -9c > "${OUTFILEBASE}.tar.bz2"
tar -cf - */out | bzip2 -9c > "${OUTFILEBASE}.tar.bz2"
exit 0
|