mirror of
https://github.com/archlinux/aur.git
synced 2026-03-05 05:12:16 +01:00
Add an old libpng with associated patches to circumvent a bug: The compiled-in zlib does not work with newer libpng versions, therefore no icons are shown in sublime-text dialogs.
22 lines
604 B
Bash
Executable file
22 lines
604 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Please note that Sublime Text 2 for some reason opens an empty instance
|
|
# if the project you're trying to open is already open in another instance,
|
|
# instead of just giving it focus.
|
|
|
|
BIN=/opt/sublime-text/sublime_text
|
|
|
|
PID=$(ps -Ao comm,pid | awk '$1 == "sublime_text" { print $2 }')
|
|
ARGS="--class=sublime_text"
|
|
|
|
if [[ ${1:(-16)} == ".sublime-project" ]]; then
|
|
ARGS="${ARGS} --project"
|
|
fi
|
|
|
|
# LD_LIBRARY_PATH is needed for old libpng
|
|
|
|
if [[ -n ${PID} ]]; then
|
|
LD_LIBRARY_PATH=/opt/sublime-text/lib ${BIN} ${ARGS} "$@"
|
|
else
|
|
LD_LIBRARY_PATH=/opt/sublime-text/lib ${BIN} ${ARGS} "$@" &
|
|
fi
|