From 2d5c6a196ef085b1ac1756de99e103bc0a98bfd9 Mon Sep 17 00:00:00 2001 From: Dimitris Papagiannis Date: Mon, 1 Jul 2024 13:42:57 +0200 Subject: [PATCH] Remove empty tmp diff in case of error --- deploy_dqmgui.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy_dqmgui.sh b/deploy_dqmgui.sh index fd57d3e..199602a 100755 --- a/deploy_dqmgui.sh +++ b/deploy_dqmgui.sh @@ -66,7 +66,7 @@ _sanitize_string() { echo "${s,,}" # convert to lowercase } -# Preliminary checks to do before installing the GUI +# oary checks to do before installing the GUI preliminary_checks() { # Display all commands if asked to if [ "$VERBOSE_LOGGING" -ne 0 ]; then @@ -102,6 +102,7 @@ preliminary_checks() { echo "INFO: Did not find $pr diff locally, trying downloading it from $DMWM_PRS_URL_BASE" if ! curl --silent -L "${DMWM_PRS_URL_BASE}/${pr}.diff" >"/tmp/${pr}.diff"; then echo "ERROR: Could not download diff for PR $pr from $DMWM_PRS_URL_BASE" + rm -rf "/tmp/${pr}.diff" exit 1 fi fi