From a50e5a23c2cf0a0034da4c22121f6b89156b8bec Mon Sep 17 00:00:00 2001 From: Andreas Romeyke <art1@andreas-romeyke.de> Date: Wed, 12 Oct 2022 14:34:23 +0200 Subject: [PATCH] - enhanced validators - fix in cmd call --- validate_workflow.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/validate_workflow.sh b/validate_workflow.sh index 1ece878..0ef7e19 100755 --- a/validate_workflow.sh +++ b/validate_workflow.sh @@ -81,16 +81,20 @@ declare -A validators # filetype has max 4 chars # stage has max 9 chars # each validator should return true if file was valid -validators[__mediathek_mkv__current]="/usr/bin/mediaconch -ft -p /etc/mediaconch/profile,xml FILE" -validators[__mediathek_mkv_upcoming]="/usr/bin/mediaconch -ft -p /etc/mediaconch/profile,xml FILE" +validators[__mediathek_mka__current]="/usr/bin/mediaconch -ft -p /etc/mediaconch/mediathek_retroaudio.xml FILE" +validators[__mediathek_mka_upcoming]="/usr/bin/mediaconch -ft -p /etc/mediaconch/mediathek_retroaudio.xml FILE" +validators[_______save_mkv__current]="/usr/bin/mediaconch -ft -p /etc/mediaconch/save_retrovideofilm_current.xml FILE" +validators[_______save_mkv_upcoming]="/usr/bin/mediaconch -ft -p /etc/mediaconch/save_retrovideofilm_upcoming.xml FILE" +validators[_______save_mka__current]="/usr/bin/mediaconch -ft -p /etc/mediaconch/save_retroaudio_current.xml FILE" +validators[_______save_mka_upcoming]="/usr/bin/mediaconch -ft -p /etc/mediaconch/save_retroaudio_current.xml FILE" validators[_____kitodo_tif__current]="/usr/bin/checkit_tiff_current /etc/checkit_tiff/retromono_current FILE" validators[_____kitodo_tif_upcoming]="/usr/bin/checkit_tiff_upcoming /etc/checkit_tiff/retromono_upcoming FILE" +validators[______lfulg_tif__current]="/usr/bin/checkit_tiff_current /etc/checkit_tiff/retrogeomono_current FILE" +validators[______lfulg_tif_upcoming]="/usr/bin/checkit_tiff_upcoming /etc/checkit_tiff/retrogeomono_upcoming FILE" validators[___fotothek_tif__current]="/usr/bin/checkit_tiff_current /etc/checkit_tiff/retrofoto_current FILE" validators[___fotothek_tif_upcoming]="/usr/bin/checkit_tiff_upcoming /etc/checkit_tiff/retrofoto_upcoming FILE" - - set -o nounset # Treat unset variables as an error # Don't just call this function "help()", as that's a reserved command in Bash. @@ -296,13 +300,13 @@ scan_file() { debug "scan_file, using stage: $stage (STAGE mode '$STAGE')" cmd=$(prepare_cmd "$MODE" "$ftype" "$stage" | sed -e "s#FILE#'$filename'#") debug "scan_file, calling cmd='$cmd'" - "$cmd" || ( error "failed call of '$cmd', $?"; exit 1) + $cmd || ( error "failed call of '$cmd', $?"; exit 1 ) done else debug "scan_file, using stage: $STAGE" cmd=$(prepare_cmd "$MODE" "$ftype" "$STAGE" | sed -e "s#FILE#'$filename'#") debug "scan_file, calling cmd='$cmd'" - "$cmd" || ( error "failed call of '$cmd', $?"; exit 1) + $cmd || ( error "failed call of '$cmd', $?"; exit 1 ) fi } -- GitLab