summaryrefslogtreecommitdiffstats
path: root/thorium-reader.sh
diff options
context:
space:
mode:
authorzxp198210052024-01-19 13:46:31 +0800
committerzxp198210052024-01-19 13:46:31 +0800
commit6dd440a9beacc88dc55c737dfe09e69dc9e77a57 (patch)
treed6bfa5fb7293bedd04a781681abd6ea782d2ee88 /thorium-reader.sh
parent5135578034f62c83cf39a321266271fd7e790dd1 (diff)
downloadpackages-6dd440a9beacc88dc55c737dfe09e69dc9e77a57.tar.gz
packages-6dd440a9beacc88dc55c737dfe09e69dc9e77a57.tar.bz2
packages-6dd440a9beacc88dc55c737dfe09e69dc9e77a57.zip
fix errors
Diffstat (limited to 'thorium-reader.sh')
-rw-r--r--thorium-reader.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/thorium-reader.sh b/thorium-reader.sh
index 2ec4412..aacd8f8 100644
--- a/thorium-reader.sh
+++ b/thorium-reader.sh
@@ -1,14 +1,15 @@
1#!/bin/bash 1#!/bin/sh
2set -e 2set -e
3_APPDIR="/usr/lib/@appname@" 3_APPDIR="/usr/lib/@appname@"
4_ASAR="${_APPDIR}/@appasar@"
4export PATH="${_APPDIR}:${PATH}" 5export PATH="${_APPDIR}:${PATH}"
5export ELECTRON_IS_DEV=0
6export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" 6export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
7_ASAR="${_APPDIR}/@appasar@" 7export ELECTRON_IS_DEV=0
8export NODE_ENV=production
9cd "${_APPDIR}"
8if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then 10if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
9 cd "${_APPDIR}"
10 exec electron@electronversion@ "${_ASAR}" "$@" 11 exec electron@electronversion@ "${_ASAR}" "$@"
11else 12else
12 cd "${_APPDIR}"
13 exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" 13 exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
14fi \ No newline at end of file 14fi
15exit \ No newline at end of file