2017-01-24 16:08:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
height=48
|
2017-02-21 10:37:47 +01:00
|
|
|
targetDir="dist/flags"
|
2017-01-24 16:08:41 +01:00
|
|
|
if [ ! -d "$targetDir" ]
|
|
|
|
then
|
|
|
|
mkdir -p "$targetDir"
|
|
|
|
fi
|
|
|
|
|
2017-02-21 10:37:47 +01:00
|
|
|
for i in src/flags/*.svg; do
|
2017-01-24 16:08:41 +01:00
|
|
|
echo "$i"
|
|
|
|
origFilename=$(basename "$i")
|
|
|
|
code=${origFilename%.*}
|
|
|
|
distFile="${targetDir}/${code}.png"
|
|
|
|
echo "$distFile"
|
|
|
|
inkscape -f "$i" -h $height -e "$distFile"
|
|
|
|
pngquant -f --ext .png -s 1 --skip-if-larger --quality 70-95 "$distFile"
|
|
|
|
done
|
|
|
|
|
2017-02-21 10:37:47 +01:00
|
|
|
inkscape -f "unk.flag.svg" -h $height -e "dist/flags/xx.png"
|
|
|
|
pngquant -f --ext .png -s 1 --skip-if-larger --quality 70-95 "dist/flags/xx.png"
|
|
|
|
inkscape -f "ti.flag.svg" -h $height -e "dist//flags/ti.png"
|
|
|
|
pngquant -f --ext .png -s 1 --skip-if-larger --quality 70-95 "dist//flags/ti.png"
|