From a6809e4cfae440c153bf82295368a41b28c6a47e Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 4 Sep 2023 15:43:47 -0400 Subject: [PATCH] Moved mogrify bin check to make more sense --- bash/jpg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bash/jpg b/bash/jpg index 8a56216..ba9d088 100755 --- a/bash/jpg +++ b/bash/jpg @@ -47,15 +47,6 @@ for _arg in ${@}; do if [ "$_arg" == "--jpg" ]; then saveasjpg=1; continue; fi done -# summary: -printf "\n%s\n" "Summary:" -printf "$padding%s\n" "Directory: $directory" -[ $keeporiginals -eq 0 ] && printf "$padding%s\n" "Originals: Delete" || printf "$padding%s\n" "Originals: Keep" -[ $keepquiet -eq 0 ] && printf "$padding%s\n" "Output: Visible" || printf "$padding%s\n" "Output: Hidden" -[ $saveasjpg -eq 0 ] && printf "$padding%s\n" "Save as: PNG" || printf "$padding%s\n" "Save as: JPG" -printf "\n%s" "Press enter to begin or ^c to exit" -read - # Make sure the mogrify command is available. If this is being # run as a cron job the which command will fail so we check the # default location just in case. @@ -67,6 +58,15 @@ if [[ $? -eq 1 ]]; then fi fi +# summary: +printf "\n%s\n" "Summary:" +printf "$padding%s\n" "Directory: $directory" +[ $keeporiginals -eq 0 ] && printf "$padding%s\n" "Originals: Delete" || printf "$padding%s\n" "Originals: Keep" +[ $keepquiet -eq 0 ] && printf "$padding%s\n" "Output: Visible" || printf "$padding%s\n" "Output: Hidden" +[ $saveasjpg -eq 0 ] && printf "$padding%s\n" "Save as: PNG" || printf "$padding%s\n" "Save as: JPG" +printf "\n%s" "Press enter to begin or ^c to exit" +read + filecount=0 [ $saveasjpg -eq 0 ] && destformat="png" || destformat="jpg" # Loop over all the .heic files in the folder