summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-05-15 09:15:01 +0800
committerzxp198210052024-05-15 09:15:01 +0800
commit67dc2bc8dfe6f84fd91fb5cc0c013ac8ffa15881 (patch)
treedf64cac901238ddf0525fbce2c92f4526fac6c07
parent11996055d4c25ec0abaa26236ad8b53dd775ac53 (diff)
downloadaur-barklarm-bin.tar.gz
fix errors
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD11
-rw-r--r--barklarm.sh21
3 files changed, 28 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 57bb6122bc50..6992426ee8d6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = barklarm-bin
pkgdesc = Displays the status of projects as an item in the tray menu bar
pkgver = 1.11.4
- pkgrel = 4
+ pkgrel = 5
url = https://www.barklarm.com
arch = x86_64
license = Apache-2.0
- depends = electron25-bin
- depends = nodejs
+ depends = electron25
provides = barklarm=1.11.4
conflicts = barklarm
+ options = !emptydirs
source = barklarm-1.11.4.deb::https://github.com/Barklarm/barklarm-app/releases/download/v1.11.4/barklarm_1.11.4_amd64.deb
source = barklarm.sh
sha256sums = 045397c3696f9b583003fcafa3c7c41e3a49e3ec04f6590811d2ab5798ddf02c
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+ sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d
pkgname = barklarm-bin
diff --git a/PKGBUILD b/PKGBUILD
index 18959f0f97f2..d3b3c26dd193 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=barklarm-bin
pkgver=1.11.4
_electronversion=25
-pkgrel=4
+pkgrel=5
pkgdesc="Displays the status of projects as an item in the tray menu bar"
arch=('x86_64')
url="https://www.barklarm.com"
@@ -11,19 +11,22 @@ license=('Apache-2.0')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- "electron${_electronversion}-bin"
- 'nodejs'
+ "electron${_electronversion}"
+)
+options=(
+ '!emptydirs'
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
"${pkgname%-bin}.sh"
)
sha256sums=('045397c3696f9b583003fcafa3c7c41e3a49e3ec04f6590811d2ab5798ddf02c'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+ '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app|g" \
+ -e "s|@cfgdirname@|${pkgname%-bin}|g" \
-e "s|@options@||g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
diff --git a/barklarm.sh b/barklarm.sh
index 7ddcaab8d734..398398461fee 100644
--- a/barklarm.sh
+++ b/barklarm.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