summarylogtreecommitdiffstats
path: root/sublime-text-2.sh
blob: a703085a8ae17a2e145f927074297f19bf1d1cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

ST=/opt/sublime-text-2

# needed for .desktop launcher
ARGS="--class=sublime_text"

# Note: Sublime Text 2 opens an empty instance if the project to open is
# already opened in another instance instead of just giving it focus.
if [[ ${1:(-16)} == ".sublime-project" ]]; then
  ARGS="${ARGS} --project"
fi

# LD_LIBRARY_PATH is needed for old libpng
export LD_LIBRARY_PATH=${ST}/lib:${LD_LIBRARY_PATH}

exec ${ST}/sublime_text ${ARGS} "$@" &