summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-02-27 11:45:46 -0500
committerChris Evich <cevich@redhat.com>2020-02-28 09:54:36 -0500
commite874b5b222cd764b7a0716408f16bb57934e071b (patch)
treebfd5bd1c8a850d1aa08be70085ad77e0c0aeab9d
parent42f04bbdaf96f3eb0adee60cfa5da01f7308ba65 (diff)
downloadpodman-e874b5b222cd764b7a0716408f16bb57934e071b.tar.gz
podman-e874b5b222cd764b7a0716408f16bb57934e071b.tar.bz2
podman-e874b5b222cd764b7a0716408f16bb57934e071b.zip
Cirrus: Print env. vars at end of setup.
There are a number of env. vars set during the setup script. Therefore displaying them at end of the script is more helpful for debugging. Signed-off-by: Chris Evich <cevich@redhat.com>
-rwxr-xr-xcontrib/cirrus/setup_environment.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index e5a32b8dd..d1730373a 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -6,15 +6,19 @@ source $(dirname $0)/lib.sh
req_env_var USER HOME GOSRC SCRIPT_BASE SETUP_MARKER_FILEPATH
-show_env_vars
-
# Ensure this script only executes successfully once and always logs ending timestamp
-[[ ! -e "$SETUP_MARKER_FILEPATH" ]] || exit 0
+if [[ -e "$SETUP_MARKER_FILEPATH" ]]; then
+ show_env_vars
+ exit 0
+fi
+
exithandler() {
RET=$?
echo "."
echo "$(basename $0) exit status: $RET"
[[ "$RET" -eq "0" ]] && date +%s >> "$SETUP_MARKER_FILEPATH"
+ show_env_vars
+ [ "$RET" -eq "0" ]] || warn "Non-zero exit caused by error ABOVE env. var. display."
}
trap exithandler EXIT