mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-17 00:47:31 +02:00
8be517484d
Credits go to OE recipy!
29 lines
409 B
Bash
29 lines
409 B
Bash
#!/bin/sh
|
|
|
|
conv() {
|
|
|
|
if [ ! -d org ]; then
|
|
mkdir org
|
|
mv *.jpg *.png org/
|
|
fi
|
|
|
|
for i in org/*; do
|
|
b=`basename $i`
|
|
ext=`expr "x$b" : 'x.*\.\(.*\)'`
|
|
if [ "$ext" = "png" ]; then
|
|
if [ $b = "tux-life.png" ]; then
|
|
cp $i _.png
|
|
else
|
|
convert $i -resize 50% _.png
|
|
fi
|
|
pngcrush -q _.png $b
|
|
elif [ "$ext" = "jpg" ]; then
|
|
convert $i -resize 50% -quality 60 $b
|
|
fi
|
|
done
|
|
rm _.png
|
|
|
|
}
|
|
|
|
conv
|