~/.local/bin/jpg
#!/bin/dash
#
# http://github.com/mitchweaver/bin
#
# recursively optimizes images
#
optimize() {
jpegoptim *.jpg --strip-all
for i in * ; do
[ -d "$i" ] &&
{ cd "$i"
optimize
cd .. ; }
done
}
optimize