From 602a6d212e8e7fad8d16cd198321cc868fa1d9d2 Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 4 Jan 2024 23:00:22 +0100 Subject: [PATCH] move convert check to more senseful place --- pixelfloot_bash.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pixelfloot_bash.sh b/pixelfloot_bash.sh index ca1636a..ec1c691 100755 --- a/pixelfloot_bash.sh +++ b/pixelfloot_bash.sh @@ -212,11 +212,7 @@ done convertimg() { - if ! command -v convert > /dev/null - then - message error "${YELLOW}convert${ENDCOLOR} not found" - exit 1 - fi + if [ -n "$RESIZE" ] then RESIZE="-resize $RESIZE" @@ -475,10 +471,15 @@ case $1 in fi ;; *) - message "all requirements satisfied ${GREEN}:)${ENDCOLOR}" + ;; esac - + if ! command -v convert > /dev/null + then + message error "${YELLOW}convert${ENDCOLOR} not found" + exit 1 + fi + message "all requirements satisfied ${GREEN}:)${ENDCOLOR}" floot ;; *)