summarylogtreecommitdiffstats
path: root/crankshaft-client.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-20 15:17:00 +0800
committerzxp198210052023-12-20 15:17:00 +0800
commit6c41383ad6b6c17d7ad08c0e2322e966cbf25363 (patch)
tree3495cd1b60b351603186bef455315cfef3ec7bd0 /crankshaft-client.sh
parent4174f4c3fa54d14aae3ef4c0530286e3b3f55a1e (diff)
downloadaur-6c41383ad6b6c17d7ad08c0e2322e966cbf25363.tar.gz
fix errors
Diffstat (limited to 'crankshaft-client.sh')
-rw-r--r--crankshaft-client.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/crankshaft-client.sh b/crankshaft-client.sh
index b3d64372f229..c77c53567639 100644
--- a/crankshaft-client.sh
+++ b/crankshaft-client.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron10
-APPDIR=/usr/lib/crankshaft-client
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${APPDIR}/lib:${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