diff options
author | zxp19821005 | 2024-05-29 16:39:17 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-29 16:39:17 +0800 |
commit | 3e347b45eac2223409dea113bb3609682ba70cee (patch) | |
tree | fa91c8af763e9d2e82a29ef6a18d4bc9cc16126a | |
parent | 92d79a0303fc96110aea57f3059e426255abcb36 (diff) | |
download | aur-fdc3-sail-bin.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | fdc3-sail.sh | 25 |
3 files changed, 27 insertions, 11 deletions
@@ -1,17 +1,17 @@ pkgbase = fdc3-sail-bin pkgdesc = Open implementation of the FDC3 standard using Electron and an integrated App Directory. pkgver = 22.12.6_1030 - pkgrel = 8 + pkgrel = 9 url = https://github.com/finos/FDC3-Sail arch = x86_64 license = Apache-2.0 makedepends = fuse2 - depends = electron24-bin + depends = electron24 provides = fdc3-sail=22.12.6_1030 conflicts = fdc3-sail source = fdc3-sail-22.12.6_1030.AppImage::https://github.com/finos/FDC3-Sail/releases/download/v22.12.6-1030/FDC3-Sail-22.12.6-1030.AppImage source = fdc3-sail.sh sha256sums = 81243023ba6af8562e5244f6d48f2e4dd8f17ab77984dda7a55ad0863959ea97 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = fdc3-sail-bin @@ -3,7 +3,7 @@ pkgname=fdc3-sail-bin _pkgname=FDC3-Sail pkgver=22.12.6_1030 _electronversion=24 -pkgrel=8 +pkgrel=9 pkgdesc="Open implementation of the FDC3 standard using Electron and an integrated App Directory." arch=('x86_64') url="https://github.com/finos/FDC3-Sail" @@ -11,7 +11,7 @@ license=('Apache-2.0') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - "electron${_electronversion}-bin" + "electron${_electronversion}" ) makedepends=( 'fuse2' @@ -21,11 +21,12 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('81243023ba6af8562e5244f6d48f2e4dd8f17ab77984dda7a55ad0863959ea97' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -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" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" diff --git a/fdc3-sail.sh b/fdc3-sail.sh index f9ced1432cfc..4cfe3ac09dd8 100644 --- a/fdc3-sail.sh +++ b/fdc3-sail.sh @@ -1,14 +1,29 @@ -#!/bin/sh -set -e +#!/bin/bash +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}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |