improved wording for not finding file
[feisty_meow.git] / scripts / pictures / shrink_pics.sh
1 #!/bin/bash
2
3 # picture shrinker, thanks to dang.
4
5 if [ $# -lt 2 ]; then
6   echo "This script needs at least 2 parameters: parm 1 is the reduction percentage"
7   echo "to use when shrinking pictures, and parm 2 (and 3, 4, etc) is a filename"
8   echo "to shrink."
9   exit 1
10 fi
11
12 percentage="$1"; shift
13
14 while true; do
15   picname="$1"; shift
16   if [ -z "$picname" ]; then
17     break
18   fi
19   mogrify -resize "$percentage%" "$picname";
20 done
21