sahara-image-elements/elements/hadoop-mapr/root.d/0-mapr-check-version
Pino Toscano 55a21cd746 Adopt DIB_DEBUG_TRACE for tracing in elements
Mimic commit 36b59c001c1643217449646b371df46d2cb11b91 in
diskimage-builder, by adopting the usage of $DIB_DEBUG_TRACE to check
whether enable tracing in scripts.

Unlike with the diskimage-builder commit, the default is to not enable
tracing even in the few scripts that used to unconditionally "set -x".

Enabling tracing can be done by either:
- passing -x to disk-image-create
- exporting DIB_DEBUG_TRACE=N, with N=0/1

Change-Id: I56ccd6753df31f7ddda641640cdb1985b2d9e856
Partial-Bug: #1435306
2015-03-23 20:12:41 +01:00

14 lines
213 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
echo "MapR version ${DIB_MAPR_VERSION}"
if [ -z ${DIB_MAPR_VERSION} ]; then
echo "DIB_MAPR_VERSION not set.\nExit"
exit 1
fi