diff options
author | zxp19821005 | 2024-05-13 13:38:13 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-13 13:38:13 +0800 |
commit | c76b6cd9afdbc631ccbadc933f8afe36d8565fc2 (patch) | |
tree | f7a3a39b9352bc6adfba45cc75d0960bd2b50f10 | |
parent | 4f775dc8b0147f1a3200fb242627cb4f39468976 (diff) | |
download | aur-borg-explorer-bin.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | borg-explorer.sh | 21 |
3 files changed, 30 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = borg-explorer-bin pkgdesc = An electron-based UI for exploring Borg Backup repositories pkgver = 0.0.9 - pkgrel = 2 + pkgrel = 3 url = https://github.com/Netruk44/borg-repository-explorer arch = x86_64 license = MIT @@ -9,11 +9,13 @@ pkgbase = borg-explorer-bin depends = electron22 provides = borg-explorer-0.0.9 conflicts = borg-explorer + options = !strip + options = !emptydirs source = borg-explorer-0.0.9.zip::https://github.com/Netruk44/borg-repository-explorer/releases/download/v0.0.9/Borg.Explorer-linux-x64-0.0.9.zip source = LICENSE-0.0.9.md::https://raw.githubusercontent.com/Netruk44/borg-repository-explorer/v0.0.9/license.md source = borg-explorer.sh sha256sums = 53a8d5ca6567f6cbd371d8685e071ef14a4683823344f95e4c1ff8ca740b6046 sha256sums = 71d8ae0fab83a418158860542b02d9df28ef74b599b75e57ac2057bdf478aaaa - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d pkgname = borg-explorer-bin @@ -3,7 +3,7 @@ pkgname=borg-explorer-bin _pkgname="Borg Explorer" pkgver=0.0.9 _electronversion=22 -pkgrel=2 +pkgrel=3 pkgdesc="An electron-based UI for exploring Borg Backup repositories" arch=("x86_64") url="https://github.com/Netruk44/borg-repository-explorer" @@ -16,6 +16,11 @@ depends=( makedepends=( 'gendesk' ) +options=( + '!strip' + '!emptydirs' + #'!staticlibs' +) source=( "${pkgname%-bin}-${pkgver}.zip::${url}/releases/download/v${pkgver}/${_pkgname// /.}-linux-x64-${pkgver}.zip" "LICENSE-${pkgver}.md::https://raw.githubusercontent.com/Netruk44/borg-repository-explorer/v${pkgver}/license.md" @@ -23,14 +28,15 @@ source=( ) sha256sums=('53a8d5ca6567f6cbd371d8685e071ef14a4683823344f95e4c1ff8ca740b6046' '71d8ae0fab83a418158860542b02d9df28ef74b599b75e57ac2057bdf478aaaa' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d') build() { sed -e "s|@electronversion@|${_electronversion}|g" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app|g" \ + -e "s|@cfgdirname@|${_pkgname}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" - gendesk -q -f -n --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-bin} %U" + gendesk -q -f -n --pkgname="${pkgname%-bin}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-bin} %U" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" diff --git a/borg-explorer.sh b/borg-explorer.sh index 7ddcaab8d734..398398461fee 100644 --- a/borg-explorer.sh +++ b/borg-explorer.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 |