Skip to content

Commit d831459

Browse files
committed
compile: Reduced verbosity of script
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent e730841 commit d831459

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

build-scripts/compile

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh -x
1+
#!/bin/sh
22

33
. "$(dirname "$0")"/functions
44
. detect-environment
@@ -12,21 +12,29 @@ case "$PROJECT" in
1212
NOVA=yes
1313
;;
1414
*)
15-
echo "Unknown project: $PROJECT"
15+
echo "$(basename "$0"): Error: Unknown project: $PROJECT"
1616
exit 42;;
1717
esac
1818

19-
$MAKE -C "$BASEDIR"/core -k
20-
$MAKE -C "$BASEDIR"/core install DESTDIR="$BASEDIR"/cfengine/dist
19+
echo "$(basename "$0"): Debug: Running make in core repo..."
20+
run_and_print_on_failure $MAKE -C "$BASEDIR"/core -k
21+
echo "$(basename "$0"): Debug: Running make install in core repo..."
22+
run_and_print_on_failure $MAKE -C "$BASEDIR"/core install DESTDIR="$BASEDIR"/cfengine/dist
2123

2224
if [ "$NOVA" = yes ]; then
23-
$MAKE -C "$BASEDIR"/enterprise -k
24-
$MAKE -C "$BASEDIR"/enterprise install DESTDIR="$BASEDIR"/cfengine/dist
25+
echo "$(basename "$0"): Debug: Running make in enterprise repo..."
26+
run_and_print_on_failure $MAKE -C "$BASEDIR"/enterprise -k
27+
echo "$(basename "$0"): Debug: Running make install in enterprise repo..."
28+
run_and_print_on_failure $MAKE -C "$BASEDIR"/enterprise install DESTDIR="$BASEDIR"/cfengine/dist
2529
if [ "$ROLE" = hub ]; then
26-
$MAKE -C "$BASEDIR"/nova -k
27-
$MAKE -C "$BASEDIR"/nova install DESTDIR="$BASEDIR"/cfengine/dist
28-
$MAKE -C "$BASEDIR"/masterfiles install DESTDIR="$BASEDIR"/cfengine/dist
30+
echo "$(basename "$0"): Debug: Running make in nova repo..."
31+
run_and_print_on_failure $MAKE -C "$BASEDIR"/nova -k
32+
echo "$(basename "$0"): Debug: Running make install in nova repo..."
33+
run_and_print_on_failure $MAKE -C "$BASEDIR"/nova install DESTDIR="$BASEDIR"/cfengine/dist
34+
echo "$(basename "$0"): Debug: Running make install in masterfiles repo..."
35+
run_and_print_on_failure $MAKE -C "$BASEDIR"/masterfiles install DESTDIR="$BASEDIR"/cfengine/dist
2936
fi
3037
else
31-
$MAKE -C "$BASEDIR"/masterfiles install DESTDIR="$BASEDIR"/cfengine/dist
38+
echo "$(basename "$0"): Debug: Running make install in masterfiles repo..."
39+
run_and_print_on_failure $MAKE -C "$BASEDIR"/masterfiles install DESTDIR="$BASEDIR"/cfengine/dist
3240
fi

0 commit comments

Comments
 (0)