diff options
author | zxp19821005 | 2024-05-30 17:45:23 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-30 17:45:23 +0800 |
commit | 04dad85b289f31c1cc7c153a8f5ac34969cc769c (patch) | |
tree | 1726356fc90a3a50851c9e61a6a7285888f45ed6 | |
parent | 933caca6b5708e0c7063ee7288253cdee1a77c8b (diff) | |
download | aur-epherome-bin.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | epherome.sh | 21 |
3 files changed, 22 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = epherome-bin pkgdesc = Powerful Minecraft Launcher pkgver = 0.7.1 - pkgrel = 10 + pkgrel = 11 url = https://epherome.com/ arch = x86_64 license = GPL-3.0-only @@ -11,6 +11,6 @@ pkgbase = epherome-bin source = epherome-0.7.1.deb::https://github.com/ResetPower/Epherome/releases/download/0.7.1/Epherome-0.7.1.deb source = epherome.sh sha256sums = 7dc740a18e73eb11aaa1ef7dad8342857ab043fb81112dac36129a1f895e49a5 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = epherome-bin @@ -3,7 +3,7 @@ pkgname=epherome-bin _pkgname=Epherome pkgver=0.7.1 _electronversion=22 -pkgrel=10 +pkgrel=11 pkgdesc="Powerful Minecraft Launcher" url="https://epherome.com/" _ghurl="https://github.com/ResetPower/Epherome" @@ -19,11 +19,12 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('7dc740a18e73eb11aaa1ef7dad8342857ab043fb81112dac36129a1f895e49a5' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|g" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${pkgname%-bin}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data."* diff --git a/epherome.sh b/epherome.sh index 7ddcaab8d734..4cfe3ac09dd8 100644 --- a/epherome.sh +++ b/epherome.sh @@ -1,16 +1,29 @@ #!/bin/bash -set -e +set -o pipefail _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" _OPTIONS="@options@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 export ELECTRON_FORCE_IS_PACKAGED=true +export ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |