diff options
author | Donald Carr | 2016-03-25 19:43:17 -0700 |
---|---|---|
committer | Donald Carr | 2016-03-25 19:43:17 -0700 |
commit | f1e8d33c75ee625426c45956895754b011904d73 (patch) | |
tree | 6451fb06e9c7e96a1e68b462b2934dbbada3377a | |
parent | 21ac2454dc424b78af900e839a5cef9b2bac9723 (diff) | |
download | aur-f1e8d33c75ee625426c45956895754b011904d73.tar.gz |
Import existing qtc script
Change-Id: I3ac0dd81c4b90ff6c02c55c641fd27cf09a5fd79
-rwxr-xr-x | qtc | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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 |