summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Carr2016-03-25 19:43:17 -0700
committerDonald Carr2016-03-25 19:43:17 -0700
commitf1e8d33c75ee625426c45956895754b011904d73 (patch)
tree6451fb06e9c7e96a1e68b462b2934dbbada3377a
parent21ac2454dc424b78af900e839a5cef9b2bac9723 (diff)
downloadaur-f1e8d33c75ee625426c45956895754b011904d73.tar.gz
Import existing qtc script
Change-Id: I3ac0dd81c4b90ff6c02c55c641fd27cf09a5fd79
-rwxr-xr-xqtc19
1 files changed, 19 insertions, 0 deletions
diff --git a/qtc b/qtc
new file mode 100755
index 000000000000..60298570a26f
--- /dev/null
+++ b/qtc
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+if [[ "$(uname -s)" = "Darwin" ]]; then
+ open -a "Qt Creator" $@
+else
+ pid=$(pidof qtcreator-bin)
+
+ # find existing creator instance
+ if [[ "${pid}" != "" ]]; then
+ creatorbin=$(ls -l /proc/${pid}/exe | awk '{ print $11 }')
+ ${creatorbin} -client $@
+ exit 0
+ fi
+
+ # failing that run the creator in your path
+ qtcreator.sh $@
+fi
+
+exit 0