summaryrefslogtreecommitdiffstats
path: root/thorium-reader.sh
blob: 2ec4412e5c4f4d0b7f329d8f3a43121205becac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -e
_APPDIR="/usr/lib/@appname@"
export PATH="${_APPDIR}:${PATH}"
export ELECTRON_IS_DEV=0
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
_ASAR="${_APPDIR}/@appasar@"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
    cd "${_APPDIR}"
    exec electron@electronversion@ "${_ASAR}" "$@"
else
    cd "${_APPDIR}"
    exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi