summarylogtreecommitdiffstats
path: root/aliyun-adrive.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-06 16:31:39 +0800
committerzxp198210052023-12-06 16:31:39 +0800
commit483b1c54388274ac58564834341654ef6fa8d875 (patch)
treee67afd45587ad818522126b66c4588db422acc7c /aliyun-adrive.sh
parent81ade81b961cff9df8ff5495906790b49ab49d7c (diff)
downloadaur-483b1c54388274ac58564834341654ef6fa8d875.tar.gz
update to 4.9.16
Diffstat (limited to 'aliyun-adrive.sh')
-rw-r--r--aliyun-adrive.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/aliyun-adrive.sh b/aliyun-adrive.sh
index 3c3820fdd9b0..2ec4412e5c4f 100644
--- a/aliyun-adrive.sh
+++ b/aliyun-adrive.sh
@@ -1,14 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron
-APPDIR="/opt/aliyun-adrive"
-export PATH="${APPDIR}:${APPDIR}/usr/sbin:${PATH}"
-export XDG_DATA_DIRS="./share/:/usr/share/gnome:/usr/local/share/:/usr/share/:${XDG_DATA_DIRS}"
-export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
-export XDG_DATA_DIRS="${APPDIR}"/usr/share/:"${XDG_DATA_DIRS}":/usr/share/gnome/:/usr/local/share/:/usr/share/
-export GSETTINGS_SCHEMA_DIR="${APPDIR}/usr/share/glib-2.0/schemas:${GSETTINGS_SCHEMA_DIR}"
-_ASAR="${APPDIR}/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