diff options
author | zxp19821005 | 2023-12-29 11:49:12 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-29 11:49:12 +0800 |
commit | 726253946cdf5f5292a2640ca20843e0639d7e99 (patch) | |
tree | 8a528362b7b8e48a7b730433bbf42df188bf559e /huelectron.sh | |
parent | 36abe1ed60ab4ee4f2cbbd57ab556af7fe36403d (diff) | |
download | aur-726253946cdf5f5292a2640ca20843e0639d7e99.tar.gz |
fix errors
Diffstat (limited to 'huelectron.sh')
-rw-r--r-- | huelectron.sh | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/huelectron.sh b/huelectron.sh index 2cc7c3acbb0e..c77c53567639 100644 --- a/huelectron.sh +++ b/huelectron.sh @@ -1,11 +1,17 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron24 -APPDIR="/usr/lib/huelectron" -export PATH="${APPDIR}:${PATH}" -#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}" -_ASAR="${APPDIR}/app.asar" +#!/bin/sh +set -e +_APPDIR="/usr/lib/@appname@" +_ASAR="${_APPDIR}/@appasar@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export NODE_ENV=production if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" + exit else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" + exit fi
\ No newline at end of file |