[misc/scripts/mkicons.sh] Add 24px icons, provide both svg & svgz
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Icon Resizer"
|
||||
echo "Base SVG must be in same dir as script"
|
||||
echo "usage: $0 input.svg icon-name category"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir oxygen-icons-sabayon
|
||||
cp $1 oxygen-icons-sabayon
|
||||
cd oxygen-icons-sabayon
|
||||
|
||||
for i in 8x8 16x16 22x22 32x32 48x48 64x64 128x128 256x256
|
||||
do
|
||||
mkdir $i
|
||||
mkdir $i/$3
|
||||
convert -filter Lanczos -background \#00000000 -resize $i\! $1 $i/$3/$2.png
|
||||
echo "converting ${1} to $i/$3/$2.png"
|
||||
done
|
||||
|
||||
mkdir scalable
|
||||
mkdir scalable/$3
|
||||
cp $1 ./scalable/$3/$2
|
||||
gzip --suffix=.svgz scalable/$3/$2
|
||||
echo "moving ${1} to scalable/$3/$2.svgz"
|
||||
|
||||
rm $1
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Icon Resizer"
|
||||
echo "Base SVG must be in same dir as script"
|
||||
echo "usage: $0 input.svg category icon-name"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir fdo-icons-sabayon
|
||||
cp $1 fdo-icons-sabayon
|
||||
cd fdo-icons-sabayon
|
||||
|
||||
for i in 8x8 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256 ; do
|
||||
echo "converting ${1} to $i/$2/$3.png"
|
||||
mkdir -p $i/$2
|
||||
convert -filter Lanczos -background \#00000000 -resize $i\! $1 $i/$2/$3.png
|
||||
done
|
||||
|
||||
echo "moving ${1} to scalable/$2/$3.svgz"
|
||||
mkdir -p scalable/$2
|
||||
cp $1 ./scalable/$2/$3
|
||||
gzip -c scalable/$2/$3 > scalable/$2/$3.svgz
|
||||
|
||||
rm $1
|
||||
Reference in New Issue
Block a user