Feature #554 ยป fixup.sh
1 |
#!/bin/bash
|
---|---|
2 |
|
3 |
for file in `ls -1` |
4 |
do
|
5 |
prefix=`echo $file | cut -f1 -d"."` |
6 |
orig=`ls -l $file` |
7 |
echo "--- Processing $file " |
8 |
convert $file $prefix.png |
9 |
convert $prefix.png -resize 400x400 $prefix.new.png |
10 |
optipng -o7 $prefix.new.png |
11 |
rm -f $prefix.png |
12 |
mv $prefix.new.png $file |
13 |
echo "$orig" |
14 |
ls -l $file |
15 |
done
|