Skip to content

Commit

Permalink
Spaces in destination folder did not work with RAW_MODE=(matomin|auto…
Browse files Browse the repository at this point in the history
…max). This updates issue #48
  • Loading branch information
tokee committed Aug 24, 2017
1 parent 6b763b0 commit 135e5b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions juxta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,10 @@ sanitize_input() {
if [ "$RAW_MODE" == "automin" ]; then
echo " - Determining image dimensions from $ICOUNTER images as RAW_MODE==$RAW_MODE"
local T=$( mktemp )
local OIFS=$IFS
IFS=$'\n' # Handles spaces in filenames
identify -format '%wx%h\n' $( cat "$IMAGE_LIST" | sed 's/[|].*//' ) > "$T"
IFS=$OLDIFS
local MINW=$( cat "$T" | cut -dx -f1 | sort -n | head -n 1 )
local MINH=$( cat "$T" | cut -dx -f2 | sort -n | head -n 1 )
rm "$T"
Expand All @@ -761,7 +764,10 @@ sanitize_input() {
elif [ "$RAW_MODE" == "automax" ]; then
echo " - Determining image dimensions from $ICOUNTER images as RAW_MODE==$RAW_MODE"
local T=$( mktemp )
local OIFS=$IFS
IFS=$'\n' # Handles spaces in filenames
identify -format '%wx%h\n' $( cat "$IMAGE_LIST" | sed 's/[|].*//' ) > "$T"
IFS=$OLDIFS
local MAXW=$( cat "$T" | cut -dx -f1 | sort -n | tail -n 1 )
local MAXH=$( cat "$T" | cut -dx -f2 | sort -n | tail -n 1 )
rm "$T"
Expand Down

0 comments on commit 135e5b6

Please sign in to comment.