summarylogtreecommitdiffstats
path: root/prepros.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-11 18:56:04 +0800
committerzxp198210052023-12-11 18:56:04 +0800
commit9d8f5634cc4fe09991b3a4ae7bf083045f0af379 (patch)
treef1ee3c0aec5c327dae2a17bba3d3bdee0d21b944 /prepros.sh
parentf9afe8cc3d80facc7f4f06f1126c78575ffcb1fb (diff)
downloadaur-9d8f5634cc4fe09991b3a4ae7bf083045f0af379.tar.gz
fix errors
Diffstat (limited to 'prepros.sh')
-rw-r--r--prepros.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/prepros.sh b/prepros.sh
index ea5a0a7ea75b..2ec4412e5c4f 100644
--- a/prepros.sh
+++ b/prepros.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron25
-APPDIR="/usr/lib/prepros"
-export PATH="${APPDIR}:${PATH}"
-#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+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
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file