File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed
Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 1+ #/bin/sh
2+
3+ HERE="$(dirname "$(readlink -f "$0")")"
4+
5+ export TERM=xterm-256color
6+ export GHOSTTY_RESOURCES_DIR="${HERE}/usr/share/ghostty"
7+
8+ exec "${HERE}"/ --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
9+
10+ if [ "$?" -gt 0 ] && [ -n "$WAYLAND_DISPLAY" ]; then
11+ export GDK_BACKEND=x11
12+ exec "${HERE}"/ --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
13+ fi
Original file line number Diff line number Diff line change @@ -92,21 +92,21 @@ HERE="$(dirname "$(readlink -f "$0")")"
9292export TERM=xterm-256color
9393export GHOSTTY_RESOURCES_DIR="${HERE}/usr/share/ghostty"
9494
95- exec "${HERE}"/${ld_linux} --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
95+ exec "${HERE}"/ld-linux.so --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
9696
9797if [ "$?" -gt 0 ] && [ -n "$WAYLAND_DISPLAY" ]; then
9898 export GDK_BACKEND=x11
99- exec "${HERE}"/${ld_linux} --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
99+ exec "${HERE}"/ld-linux.so --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
100100fi
101101EOF
102102
103103chmod +x AppRun
104104
105- # export VERSION="$(./AppRun --version 2>/dev/null | awk 'FNR==1 {print $2}')"
106- # if [ -z "$VERSION" ]; then
107- # echo "ERROR: Could not get version from ghostty binary"
108- # exit 1
109- # fi
105+ export VERSION=" $( ./AppRun --version 2> /dev/null | awk ' FNR==1 {print $2}' ) "
106+ if [ -z " $VERSION " ]; then
107+ echo " ERROR: Could not get version from ghostty binary"
108+ exit 1
109+ fi
110110
111111cp " ${APPDATA_FILE} " " usr/share/metainfo/com.mitchellh.ghostty.appdata.xml"
112112
You can’t perform that action at this time.
0 commit comments