summaryrefslogtreecommitdiffstats
path: root/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh')
-rwxr-xr-xutil/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh b/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh
new file mode 100755
index 0000000..e5fd5c1
--- /dev/null
+++ b/util/scripts/mac-binary/install/xcode/integration/scripts/make_uic.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+CFG_UIC="/usr/bin/uic"
+CFG_INPUT=
+CFG_OUTPUT=
+
+while [ -n "$1" ]; do
+ CACHE_1="$1"
+ OPTION=
+ ARG=
+ case $1 in
+ -*=*) #gnu style
+ OPTION=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\1,'`
+ ARG=`echo $1 | sed 's,-\([^=]*\)=\(.*\),\2,'`
+ ;;
+ -output|-input|-uic) #second arg style
+ OPTION=`echo $1 | sed 's,-\([^=]*\),\1,'`
+ shift
+ ARG=$1
+ ;;
+ esac
+ shift
+ case "$OPTION" in
+ uic) CFG_UIC="$ARG" ;;
+ output) CFG_OUTPUT="$ARG" ;;
+ input) CFG_INPUT="$ARG" ;;
+ help|*)
+ [ "$OPTION" = "help" ] || echo "Unknown option $CACHE_1!"
+ echo "Help!!"
+ exit 888;
+ ;;
+ esac
+done
+
+if [ -z "$CFG_INPUT" ] || [ -z "$CFG_OUTPUT" ]; then
+ echo "No input/output file specified."
+ exit 1
+fi
+[ "$CFG_OUTPUT" -nt "$CFG_INPUT" ] && exit 0
+cd "${SOURCE_ROOT}"
+
+#do the uic
+$CFG_UIC -o "$CFG_OUTPUT" "$CFG_INPUT"