summarylogtreecommitdiffstats
path: root/elements-latex.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-04 23:52:20 +0800
committerzxp198210052023-12-04 23:52:20 +0800
commitb7ad7d4ba8156db1bdc3cd007fd7dc3d2bc01b9f (patch)
tree5c31855323ba50661f16022557d4553c455ffb3c /elements-latex.sh
parent49b2f9172815c9f2d81a90a29dd1d23738e05b61 (diff)
downloadaur-b7ad7d4ba8156db1bdc3cd007fd7dc3d2bc01b9f.tar.gz
fix errors
Diffstat (limited to 'elements-latex.sh')
-rw-r--r--elements-latex.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/elements-latex.sh b/elements-latex.sh
index 61ecebdd1a91..3342cf0aad09 100644
--- a/elements-latex.sh
+++ b/elements-latex.sh
@@ -1,8 +1,15 @@
+
#!/bin/bash
-_ELECTRON=/usr/bin/electron18
-_ASAR="/opt/elements-latex/resources/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