#! /bin/bash

echo "Compiling .ui files to C#"

for uiFile in qt-gui/*.ui
do
	csFile=${uiFile/.ui/.cs}
	
	# Only update if file has changed
	if test $uiFile -nt $csFile
	then
		echo -ne "  * Compiling $uiFile..."
		uics -o $csFile $uiFile
		echo "...compiled."
	else
		echo "  * Skipping $uiFile - no update needed"
	fi
done

echo
