diff options
author | zxp19821005 | 2023-12-04 23:52:20 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-04 23:52:20 +0800 |
commit | b7ad7d4ba8156db1bdc3cd007fd7dc3d2bc01b9f (patch) | |
tree | 5c31855323ba50661f16022557d4553c455ffb3c /elements-latex.sh | |
parent | 49b2f9172815c9f2d81a90a29dd1d23738e05b61 (diff) | |
download | aur-b7ad7d4ba8156db1bdc3cd007fd7dc3d2bc01b9f.tar.gz |
fix errors
Diffstat (limited to 'elements-latex.sh')
-rw-r--r-- | elements-latex.sh | 15 |
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 |