correcting generate-assets.sh script and Makefile (thanks Krytarik)
parent
4774023b0f
commit
5635520483
2
Makefile
2
Makefile
|
@ -16,6 +16,7 @@ css:
|
|||
$(SASS) --update $(SASSFLAGS) $(SCSS_DIR320):$(DIST_DIR320)
|
||||
|
||||
gresource: css
|
||||
scripts/generate-assets.sh
|
||||
$(GLIB_COMPILE_RESOURCES) --sourcedir=$(RES_DIR) $(RES_DIR)/gtk.gresource.xml
|
||||
$(GLIB_COMPILE_RESOURCES) --sourcedir=$(RES_DIR320) $(RES_DIR320)/gtk.gresource.xml
|
||||
|
||||
|
@ -30,6 +31,7 @@ clean:
|
|||
rm -f $(RES_DIR)/gtk.gresource
|
||||
rm -rf $(DIST_DIR320)
|
||||
rm -f $(RES_DIR320)/gtk.gresource
|
||||
rm -f assets/*.png
|
||||
|
||||
install: all
|
||||
install -d -m755 $(INSTALL_DIR)
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -z $1 ]] ; then
|
||||
echo "Usage: $0 [FILE]"
|
||||
exit 0
|
||||
else
|
||||
FILENAME=$1
|
||||
fi
|
||||
SVGTABLE="assets/all-assets.svg"
|
||||
IDPRFX="EXP-"
|
||||
|
||||
PREFIX=EXP-
|
||||
|
||||
for ID in `grep -o "id=\"$PREFIX.*\"" $FILENAME | cut -d\" -f2` ; do
|
||||
OUTPUT=${ID#$PREFIX}.png
|
||||
echo "Exporting area $ID to $OUTPUT..."
|
||||
inkscape --export-id=$ID --export-png=$OUTPUT --file=$FILENAME
|
||||
for ID in $(sed -n 's/.*id="\('"$IDPRFX"'[^"]\+\)".*/\1/p' $SVGTABLE); do
|
||||
echo "Generating 'assets/${ID#$IDPRFX}.png' ..."
|
||||
inkscape --without-gui --export-id=$ID --export-png=assets/${ID#$IDPRFX}.png $SVGTABLE
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue