From: Fred Hamster Date: Sat, 14 Dec 2024 23:19:29 +0000 (-0500) Subject: better logging on errors X-Git-Tag: 2.140.189^2~76 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=5f71e25343e0f73b04c308d906e264680826f582;p=feisty_meow.git better logging on errors --- diff --git a/scripts/customize/fred/scripts/jobby/archie_grabber.sh b/scripts/customize/fred/scripts/jobby/archie_grabber.sh index 9995a287..85b3348f 100644 --- a/scripts/customize/fred/scripts/jobby/archie_grabber.sh +++ b/scripts/customize/fred/scripts/jobby/archie_grabber.sh @@ -26,13 +26,14 @@ function grab_archies() local cp_outfile="$(mktemp /tmp/archie_grabber.XXXXXX)" netcp ${host}.${domain_piece}:${ARCHIVE_DIR_PREFIX}* . &> "$cp_outfile" retval=$? -#hmmm: could display the output on error. and we have a function for that... - rm "$cp_outfile" if [ $retval -ne 0 ]; then + cat "$cp_outfile" + rm "$cp_outfile" echo "got return value $retval from copying ${ARCHIVE_DIR_PREFIX}* from ${host}.${domain_piece}; skipping it." popd continue fi + rm "$cp_outfile" # code below cleans up any archive dirs on the host by hiding them in an # old junk folder. the junk folder can be cleaned up later as desired.