WhiteSur-gtk-theme/src/main/gtk-3.0/make_gresource_xml.sh

35 lines
1.0 KiB
Bash
Raw Normal View History

2020-07-15 00:35:03 +08:00
#! /bin/bash
INDEX="../../assets/gtk-3.0/common-assets/assets.txt"
WINDEX="../../assets/gtk-3.0/windows-assets/assets.txt"
if [ -f gtk.gresource.xml ]; then
rm -rf gtk.gresource.xml
fi
echo '<?xml version="1.0" encoding="UTF-8"?>' >> gtk.gresource.xml
echo "<gresources>" >> gtk.gresource.xml
2020-07-23 10:11:42 +08:00
echo ' <gresource prefix="/org/gnome/theme">' >> gtk.gresource.xml
2020-07-15 00:35:03 +08:00
for i in `cat $INDEX`
do
echo " <file>assets/$i.png</file>" >> gtk.gresource.xml
echo " <file>assets/$i@2.png</file>" >> gtk.gresource.xml
done
for i in `cat $WINDEX`
do
echo " <file>windows-assets/$i.png</file>" >> gtk.gresource.xml
echo " <file>windows-assets/$i@2.png</file>" >> gtk.gresource.xml
echo " <file>windows-assets/$i-dark.png</file>" >> gtk.gresource.xml
echo " <file>windows-assets/$i-dark@2.png</file>" >> gtk.gresource.xml
done
echo " <file>gtk.css</file>" >> gtk.gresource.xml
echo " <file>gtk-dark.css</file>" >> gtk.gresource.xml
echo " </gresource>" >> gtk.gresource.xml
echo "</gresources>" >> gtk.gresource.xml
exit 0