mkqrc.sh

Fri, 21 Jun 2013 17:52:44 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 21 Jun 2013 17:52:44 +0300
changeset 299
db60288fc36a
parent 293
a0ed563e14b2
child 353
07b3753baedc
permissions
-rwxr-xr-x

Only write config options to file that actually deviate from the default. Should've done this earlier on... before 0.1 alpha was tagged

#!/bin/bash

QRCFILE=ldforge.qrc
FILES=$(echo ./icons/*.* data/*.* LICENSE LICENSE.icons)

printf "" > $QRCFILE

printf "<!DOCTYPE RCC>\n<RCC version=\"1.0\">\n<qresource>\n" >> $QRCFILE

# Make sure that whatever goes to QRC is added to the repo.
# I keep forgetting to do this myself.
for line in $(hg status $FILES |grep "?"); do
	if [ "$line" != "?" ]; then
		echo "hg add $line"
		hg add $line;
		
		echo "pngout $line"
		pngout $line
	fi
done

for f in $FILES; do
	printf "\t<file>$f</file>\n" >> $QRCFILE
done

printf "</qresource>\n</RCC>\n" >> $QRCFILE

mercurial