summarylogtreecommitdiffstats
path: root/qtc
blob: 93c5d24c24755c1df9250e015572ea39f9475172 (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 $@
fi

exit 0