The current templates do not provide a central logging nor do they check mandatory parameter. Scripts must be enhanced to include basic checks and a central logging.
similar to the following code
# Define a bunch of bash option see
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
set -o nounset # stop script after 1st cmd failed
set -o errexit # exit when 1st unset variable found
set -o pipefail # pipefail exit after 1st piped commands failed
readonly LOGFILE="${LOG_BASE}/$(basename ${SCRIPT_NAME} .sh).log"
touch ${LOGFILE} 2>/dev/null
exec 1> >(tee -a "$LOGFILE")
exec 2>&1 # Redirect standard error to standard out
echo "INFO: Start to build MODS white papers using ${SCRIPT_NAME}"
The current templates do not provide a central logging nor do they check mandatory parameter. Scripts must be enhanced to include basic checks and a central logging.
similar to the following code