aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL/setup_image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'INSTALL/setup_image.sh')
-rwxr-xr-xINSTALL/setup_image.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/INSTALL/setup_image.sh b/INSTALL/setup_image.sh
index 6acef66..ad79e10 100755
--- a/INSTALL/setup_image.sh
+++ b/INSTALL/setup_image.sh
@@ -18,13 +18,25 @@ function debug() {
set -x
return 0 # continue
}
+
+function crash() {
+ set +x
+ echo " -------------------------"
+ echo "| CRASH HANDLER TRIGGERED |"
+ echo " -------------------------"
+ exit 1
+}
+
# get the INSTALL dir (the one where we were launched)
INSTDIR=$(cd $(dirname $0) && pwd -P)
echo "Detected container install dir = $INSTDIR"
if [[ -f $INSTDIR/DEBUG ]]; then
- echo "#### DEBUG MODE IS ACTIVE ####"
+ echo "#### INTERACTIVE DEBUG MODE IS ACTIVE ####"
trap debug ERR # on error, run a sleep tp debug container
+else
+ echo "#### JENKINS MODE MODE IS ACTIVE ####"
+ trap crash ERR # on error, simply crash
fi