mkqrc.sh

Fri, 17 May 2013 11:53:28 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 17 May 2013 11:53:28 +0300
changeset 213
a4113545242c
parent 206
c069e7b5f5f3
child 241
cffab8e109f6
permissions
-rwxr-xr-x

Look for LDraw files in the part's directory first

#!/bin/bash

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

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