refactoring the directories, especially for scripts; moved gimp stuff out to db since...
[feisty_meow.git] / scripts / pictures / shrink_pics.sh
diff --git a/scripts/pictures/shrink_pics.sh b/scripts/pictures/shrink_pics.sh
new file mode 100644 (file)
index 0000000..d4b442d
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# picture shrinker, thanks to dang.
+
+if [ $# -lt 2 ]; then
+  echo "This script needs at least 2 parameters: parm 1 is the reduction percentage"
+  echo "to use when shrinking pictures, and parm 2 (and 3, 4, etc) is a filename"
+  echo "to shrink."
+  exit 1
+fi
+
+percentage="$1"; shift
+
+for i in $*; do
+  mogrify -resize $percentage% $i;
+done
+