From 61293a250a34b9f0789fc8e8d5c25c793f54a0e9 Mon Sep 17 00:00:00 2001 From: Jens Steidl <Jens.Steidl@slub-dresden.de> Date: Mon, 25 Sep 2023 15:51:51 +0200 Subject: [PATCH] - removed double spaces --- src/usr/local/bin/validate_workflow.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/usr/local/bin/validate_workflow.sh b/src/usr/local/bin/validate_workflow.sh index 93cd59d..4dcb176 100755 --- a/src/usr/local/bin/validate_workflow.sh +++ b/src/usr/local/bin/validate_workflow.sh @@ -123,8 +123,8 @@ check_argument_notempty() { } # Don't just call this function "help()", as that's a reserved command in Bash. -comment_help() { - sed -rn 's/^#hh ?//;T;p' "$0" +comment_help() { + sed -rn 's/^#hh ?//;T;p' "$0" } calc_statistics() { @@ -169,7 +169,7 @@ update_statistics() { trim_statistics() { debug "trim_statistics" - tail -n "${MIN_STAT_LINES}" "${STATFILE}" > "${STATFILE}.new" || (error "could not trim ${STATFILE} to ${STATFILE}.new" ; exit 1 ) + tail -n "${MIN_STAT_LINES}" "${STATFILE}" > "${STATFILE}.new" || (error "could not trim ${STATFILE} to ${STATFILE}.new"; exit 1 ) mv "${STATFILE}.new" "${STATFILE}" || ( error "count not trim ${STATFILE},because could not mv ${STATFILE}.new to ${STATFILE}"; exit 1 ) } @@ -193,7 +193,7 @@ get_mimetype() { local filename="$1" check_argument_notempty "${filename}" local res - res=$(file --mime-type "${filename}" | sed -e "s/^.*: //") + res=$(file --mime-type "${filename}" | sed -e "s/^.*: //") echo "${res}" } @@ -290,7 +290,7 @@ get_cli_args() { exit 1 fi else - if [[ "${WITH_DAEMON}" -eq 1 ]] && [[ "${FILES_MODE}" = "sort" ]]; then + if [[ "${WITH_DAEMON}" -eq 1 ]] && [[ "${FILES_MODE}" = "sort" ]]; then error "param --daemon does only work with param --mode='delete' or --mode='nothing'!" exit 1 fi @@ -462,7 +462,7 @@ get_logfile() { local logname check_argument_notempty "${filename}" if [[ -n "${WATCH_FOLDER}" ]] && [[ "${WITH_PIPE}" -eq 0 ]]; then - logname=$(echo "${filename}"| sed -e "s#^${WATCH_FOLDER}#${RESULT_FOLDER}#" -e "s#\$#.log#") + logname=$(echo "${filename}"| sed -e "s#^${WATCH_FOLDER}#${RESULT_FOLDER}#" -e "s#\$#.log#") else # pipe uses a temp filename logname="${filename}.log" fi @@ -542,7 +542,7 @@ if [[ "${WITH_PIPE}" -eq 1 ]]; then cat - > "${filename}" scan_file "${filename}" cat "${filename}.log" - rm -f "${filename}.log" || error "could not remove temporary file '${filename}.log'" + rm -f "${filename}.log" || error "could not remove temporary file '${filename}.log'" rm -f "${filename}" || error "could not remove temporary file '${filename}'" else if [[ "${WITH_DAEMON}" -eq 1 ]]; then -- GitLab