From e2850d38c069b2c2c60da9d2136732608a9a496d Mon Sep 17 00:00:00 2001 From: Reto Kromer Date: Fri, 9 Feb 2018 21:22:31 +0100 Subject: [PATCH] simplify code (#304) --- scripts/check_audio_framemd5.sh | 5 ++--- scripts/check_video_framemd5.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/check_audio_framemd5.sh b/scripts/check_audio_framemd5.sh index 7b72fe3..97476ab 100755 --- a/scripts/check_audio_framemd5.sh +++ b/scripts/check_audio_framemd5.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash SCRIPT=$(basename "${0}") - VERSION='2017-07-08' + VERSION='2018-02-09' AUTHOR='ffmprovisr' RED='\033[1;31m' BLUE='\033[1;34m' @@ -67,9 +67,8 @@ old_file=$(grep -v '^#' "${input_hash}") tmp_file=$(grep -v '^#' "${md5_tmp}") if [[ "${old_file}" = "${tmp_file}" ]]; then echo -e "${BLUE}'$(basename "${input_file}")' matches '$(basename "${input_hash}")'${NC}" - rm "${md5_tmp}" else echo -e "${RED}The following differences were detected between '$(basename "${input_file}")' and '$(basename "${input_hash}")':${NC}" diff "${input_hash}" "${md5_tmp}" - rm "${md5_tmp}" fi +rm "${md5_tmp}" diff --git a/scripts/check_video_framemd5.sh b/scripts/check_video_framemd5.sh index ffa7c71..d7a345a 100644 --- a/scripts/check_video_framemd5.sh +++ b/scripts/check_video_framemd5.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash SCRIPT=$(basename "${0}") - VERSION='2017-07-08' + VERSION='2018-02-09' AUTHOR='ffmprovisr' RED='\033[1;31m' BLUE='\033[1;34m' @@ -64,9 +64,8 @@ old_file=$(grep -v '^#' "${input_hash}") tmp_file=$(grep -v '^#' "${md5_tmp}") if [[ "${old_file}" = "${tmp_file}" ]]; then echo -e "${BLUE}'$(basename "${input_file}")' matches '$(basename "${input_hash}")'${NC}" - rm "${md5_tmp}" else echo -e "${RED}The following differences were detected between '$(basename "${input_file}")' and '$(basename "${input_hash}")':${NC}" diff "${input_hash}" "${md5_tmp}" - rm "${md5_tmp}" fi +rm "${md5_tmp}"