From ad08a2956e9fdb819618daf441fe99a94f2d9ea5 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sun, 23 Jul 2023 21:19:43 +0300 Subject: [PATCH] fix(scripts): improve replacable function errors --- scripts/shared.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/shared.sh b/scripts/shared.sh index f6e31d6..e40e199 100755 --- a/scripts/shared.sh +++ b/scripts/shared.sh @@ -250,7 +250,7 @@ function replacable() FILE2="$2" [[ ! -r "$FILE1" ]] && { msg_err "File 1 ($FILE1) does not exist" && return 1; } - [[ ! -r "$FILE2" ]] && { msg_err "File 2 ($FILE2) does not exist" && return 1; } + [[ ! -r "$FILE2" ]] && { msg_err "File 2 ($FILE2) does not exist, replacable" && return 1; } FILE1_HASH=$(get_sha256sum "$FILE1") FILE2_HASH=$(get_sha256sum "$FILE2") @@ -259,7 +259,7 @@ function replacable() msg_err "Could not get hash for file 1 ($FILE1)" && return 1; } [[ $FILE2_HASH = "" ]] && { - msg_err "Could not get hash for file 2 ($FILE2)" && return 1; + msg_err "Could not get hash for file 2 ($FILE2), replacable" && return 1; } [[ "$FILE1_HASH" == "$FILE2_HASH" ]] && {