Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (15 sloc) 0.385 kB
#!/bin/bash
if [ -z $1 ]; then
echo "No directory specified"
exit 1
fi
targetDir="$1"
targetDir=${targetDir%/} # remove trailing slash if there is one
find "$targetDir" -name "*.png" -or -name "*.jpg" -or -name "*.jpeg" | while read line; do
echo "Optimizing $line"
image2web "$line"
done
find "$targetDir" -name "*.png" | while read line; do
optipng -o7 "$line"
done
exit 0
Jump to Line
Something went wrong with that request. Please try again.