-
Notifications
You must be signed in to change notification settings - Fork 104
/
build-apps.sh
executable file
·49 lines (48 loc) · 1011 Bytes
/
build-apps.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
SCDIR=$(realpath "$SCDIR")
(return 0 2>/dev/null) && sourced=1 || sourced=0
function check_env() {
eval ev='$'$1
if [ "$ev" == "" ]; then
echo "$1 not defined"
if (( sourced != 0 )); then
return 1
else
exit 1
fi
fi
}
if [ "$1" = "" ]; then
MAVEN_GOAL="install"
else
MAVEN_GOAL="$*"
fi
RC=0
set +e
$SCDIR/create-matrices.sh
PROCESSORS=$(jq -c '.processors | .[]' matrix.json | sed 's/\"//g')
SINKS=$(jq -c '.sinks | .[]' matrix.json | sed 's/\"//g')
SOURCES=$(jq -c '.sources | .[]' matrix.json | sed 's/\"//g')
for app in $PROCESSORS; do
$SCDIR/build-app.sh . "applications/processor/$app"
RCC=$?
if ((RCC!=0)); then
RC=$RCC
fi
done
for app in $SOURCES; do
$SCDIR/build-app.sh . "applications/source/$app"
RCC=$?
if ((RCC!=0)); then
RC=$RCC
fi
done
for app in $SINKS; do
$SCDIR/build-app.sh . "applications/sink/$app"
RCC=$?
if ((RCC!=0)); then
RC=$RCC
fi
done
exit $RC