summaryrefslogtreecommitdiffstats
path: root/thorium-reader.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-13 18:43:27 +0800
committerzxp198210052023-12-13 18:43:27 +0800
commit5135578034f62c83cf39a321266271fd7e790dd1 (patch)
treee016b08294174fb65108dfc0576bccf3821be5ec /thorium-reader.sh
parent787dcd16dbf73e81d62cb1d73990ba7f778cfa9c (diff)
downloadpackages-5135578034f62c83cf39a321266271fd7e790dd1.tar.gz
packages-5135578034f62c83cf39a321266271fd7e790dd1.tar.bz2
packages-5135578034f62c83cf39a321266271fd7e790dd1.zip
fix errors
Diffstat (limited to 'thorium-reader.sh')
-rw-r--r--thorium-reader.sh16
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 2set -e
3APPDIR="/usr/lib/thorium-reader" 3_APPDIR="/usr/lib/@appname@"
4export PATH="${APPDIR}:${PATH}" 4export PATH="${_APPDIR}:${PATH}"
5_ASAR="${APPDIR}/app.asar" 5export ELECTRON_IS_DEV=0
6export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
7_ASAR="${_APPDIR}/@appasar@"
6if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then 8if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
7 exec ${_ELECTRON} ${_ASAR} "$@" 9 cd "${_APPDIR}"
10 exec electron@electronversion@ "${_ASAR}" "$@"
8else 11else
9 exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" 12 cd "${_APPDIR}"
13 exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
10fi \ No newline at end of file 14fi \ No newline at end of file