summaryrefslogtreecommitdiffstats
path: root/qtinterface/uic-tqt
blob: dbe46971234aa89d56742c181c6be6de46afb80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

if [[ $1 == "" ]]; then
	echo "Usage: uic-tqt <uic arguments>"
else
	for var in "$@"
	do
		if [[ ${var##*.} == "ui" ]]; then
			uifile=$var
		fi
	done

	if [[ "$uifile" != "" ]]; then
		cp -Rp $uifile $uifile.bkp
		tqt-replace $uifile
	fi
	uic "$@"
	if [[ "$uifile" != "" ]]; then
		cp -Rp $uifile.bkp $uifile
		rm -f $uifile.bkp
	fi
fi