From: Chris Koeritz Date: Mon, 21 May 2018 20:34:17 +0000 (-0400) Subject: made safe for names with spaces X-Git-Tag: 2.140.112^2~14 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=563c91d0e7636935106919ea4b1962a48c2b973b;hp=9ebc8de9b7f5697cacf71832a8a1ba291062fb66;p=feisty_meow.git made safe for names with spaces --- diff --git a/scripts/pictures/shrink_pics.sh b/scripts/pictures/shrink_pics.sh index d4b442d5..941f7972 100644 --- a/scripts/pictures/shrink_pics.sh +++ b/scripts/pictures/shrink_pics.sh @@ -11,7 +11,11 @@ fi percentage="$1"; shift -for i in $*; do - mogrify -resize $percentage% $i; +while true; do + picname="$1"; shift + if [ -z "$picname" ]; then + break + fi + mogrify -resize "$percentage%" "$picname"; done