blob: 284746776fa882752456107029d41209cc1804c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/sh
icondir="$1"
if test ! -d "$icondir"; then
echo "Pass a directory to the theme dir in the argument"
exit 1;
fi
if test ! -f "$icondir/index.theme"; then
echo "Not an icontheme directory!"
exit 1;
fi
cmd="svgtopng/svgtopng"
echo "== Processing $1"
echo " * Creating png icons from svg files and symlinks"
#ignore list customized for elementary-xfce
find "$icondir" -iname "*.svg" -not \( -wholename "*/scalable/*" -o -wholename "*/symbolic/*" -o -wholename "*-symbolic.svg" -o -wholename "*/animations/*process-*" -o -wholename "*/animations/*gnome-spinner*" -o -wholename "*/animations*pk-action-refresh*" \) -exec $cmd {} +
echo " * Cleanup icon directory"
find "$icondir" -name "untitled folder" -type d -exec rm -rf {} +
echo " * Deleting svg files"
find "$icondir" -iname '*.svg' -not \( -wholename "*/scalable/*" -o -wholename "*/symbolic/*" -o -wholename "*-symbolic.svg" -o -wholename "*/animations/*process-*" -o -wholename "*/animations/*gnome-spinner*" -o -wholename "*/animations*pk-action-refresh*" \) -delete
#ignore the output if the theme depends on another one (e.g. elementary-xfce-dark needs to be converted before elementary-xfce)
echo " * Checking dangling symlinks"
if find -L "elementary-xfce" -type l -exec /bin/ls -go {} \; | grep .; then
echo "Found some dangling symlinks, please go fix those.";
exit 1;
fi
|