summarylogtreecommitdiffstats
path: root/bear-graph.sh
diff options
context:
space:
mode:
authorzxp198210052024-01-15 17:47:11 +0800
committerzxp198210052024-01-15 17:47:11 +0800
commit9b13fcf69fc126f2d589967b9b1c330acebaef1b (patch)
tree9183198cf05070375fb13b2026436a914f2b704f /bear-graph.sh
parent0f04a48519cff2f8ed221ac380c694ead3dda1ab (diff)
downloadaur-9b13fcf69fc126f2d589967b9b1c330acebaef1b.tar.gz
fix errors
Diffstat (limited to 'bear-graph.sh')
-rw-r--r--bear-graph.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/bear-graph.sh b/bear-graph.sh
index 248c78869cd5..aacd8f895847 100644
--- a/bear-graph.sh
+++ b/bear-graph.sh
@@ -1,13 +1,15 @@
-#!/bin/bash
-APPDIR="/usr/lib/bear-graph"
-export PATH="${APPDIR}:${PATH}"
+#!/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 LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+export NODE_ENV=production
+cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- cd $APPDIR
- exec electron@electronversion@ ${_ASAR} "$@"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- cd $APPDIR
- exec electron@electronversion@ ${_ASAR} --no-sandbox "$@"
-fi \ No newline at end of file
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+fi
+exit \ No newline at end of file