updated on Thu Jan 19 08:03:52 UTC 2012
[aur-mirror.git] / sublime-text-dev / subl
blobef0a2b89ed46c7d67bb0016cad293017a01fb596
1 #!/bin/sh
3 # Please note that Sublime Text 2 for some reason opens an empty instance
4 # if the project you're trying to open is already open in another instance,
5 # instead of just giving it focus.
7 BIN=/opt/sublime-text-dev/sublime_text
9 PID=$(pidof -o %PPID ${BIN})
10 ARGS=${@}
12 if [[ ${1:(-16)} == ".sublime-project" ]]; then
13 ARGS="--project ${ARGS}"
16 if [[ -n ${PID} ]]; then
17 ${BIN} ${ARGS}
18 else
19 ${BIN} ${ARGS} &