summarylogtreecommitdiffstats
path: root/qtc
blob: 60298570a26f213ad6582a7be4c882386efb7401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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