blob: 511c14efe08562888ffc21d73e746c61811e8d64 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/bash -x
prefix="${TOOLCHAIN}"
taskdir="${TOOLCHAIN_BUILD}/etc/${PIPELINE}/tasks"
export _maxjobs=$(getconf _NPROCESSORS_ONLN)
export PATH="${prefix}/bin:${PATH}"
export CFLAGS="-I${prefix}/include"
export LDFLAGS="-L${prefix}/lib -Wl,-rpath=${prefix}/lib"
export PKG_CONFIG_PATH="${prefix}/lib/pkgconfig"
export PREFIX="${prefix}"
if [[ ! -d ${taskdir} ]]; then
echo "No tasks. ${taskdir} does not exist."
exit 1
fi
printenv | sort
for task in ${taskdir}/*
do
# Check for execution permission
if [[ ! -x ${task} ]]; then
echo "Skipping: ${task}"
continue
fi
echo "Executing: ${task}"
${task}
retval=$?
if [[ ${retval} != 0 ]]; then
echo "TASK FAILED: ${task}"
exit ${retval}
fi
done
|