diff options
Diffstat (limited to 'thorium-reader.sh')
-rw-r--r-- | thorium-reader.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/thorium-reader.sh b/thorium-reader.sh index 61a96a6..2ec4412 100644 --- a/thorium-reader.sh +++ b/thorium-reader.sh | |||
@@ -1,10 +1,14 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | _ELECTRON=/usr/bin/electron25 | 2 | set -e |
3 | APPDIR="/usr/lib/thorium-reader" | 3 | _APPDIR="/usr/lib/@appname@" |
4 | export PATH="${APPDIR}:${PATH}" | 4 | export PATH="${_APPDIR}:${PATH}" |
5 | _ASAR="${APPDIR}/app.asar" | 5 | export ELECTRON_IS_DEV=0 |
6 | export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" | ||
7 | _ASAR="${_APPDIR}/@appasar@" | ||
6 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then | 8 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then |
7 | exec ${_ELECTRON} ${_ASAR} "$@" | 9 | cd "${_APPDIR}" |
10 | exec electron@electronversion@ "${_ASAR}" "$@" | ||
8 | else | 11 | else |
9 | exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" | 12 | cd "${_APPDIR}" |
13 | exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" | ||
10 | fi \ No newline at end of file | 14 | fi \ No newline at end of file |