summarylogtreecommitdiffstats
path: root/frosch.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-21 15:55:15 +0800
committerzxp198210052023-12-21 15:55:15 +0800
commit9f7e8028b8a91b4b734fd4642740a2f7b6aa48ef (patch)
tree45ba57842d260652c124df6386bedbb154d3e03e /frosch.sh
parentb53ba6a2c96bb1806988d1ba9596887bf0996d95 (diff)
downloadaur-9f7e8028b8a91b4b734fd4642740a2f7b6aa48ef.tar.gz
fix errors
Diffstat (limited to 'frosch.sh')
-rw-r--r--frosch.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/frosch.sh b/frosch.sh
index 11647f052013..c77c53567639 100644
--- a/frosch.sh
+++ b/frosch.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron11
-APPDIR="/usr/lib/frosch"
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app"
+#!/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