diff options
author | zxp19821005 | 2024-05-28 18:16:08 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-28 18:16:08 +0800 |
commit | 253743b10e92118acf9f22238d740951e5124ddd (patch) | |
tree | 4360ed4ef38632af9ddb21965f2e524a6f222586 | |
parent | cbd5633ceb8a12db82c4557a930ada7e9a8886f2 (diff) | |
download | aur-253743b10e92118acf9f22238d740951e5124ddd.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | tilde-podcast.sh | 21 |
3 files changed, 24 insertions, 10 deletions
@@ -1,12 +1,12 @@ pkgbase = tilde-podcast-bin pkgdesc = Podcast client to listen to all you favorite podcasts pkgver = 1.0.0 - pkgrel = 7 + pkgrel = 8 url = https://github.com/paologiua/tilde arch = x86_64 license = MIT makedepends = fuse2 - depends = electron10-bin + depends = electron10 provides = tilde-podcast=1.0.0 conflicts = tilde-podcast source = tilde-podcast-1.0.0.AppImage::https://github.com/paologiua/tilde/releases/download/v1.0.0/Tilde-1.0.0.AppImage @@ -14,6 +14,6 @@ pkgbase = tilde-podcast-bin source = tilde-podcast.sh sha256sums = 36d92737e95db21231d580de2dd28b8d970f0872dec4f4f8e2e7143742f83702 sha256sums = f1492bf906d1183083c07f5074b51ea36dc616136bf76d9f87e9a535a5345080 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = tilde-podcast-bin @@ -3,7 +3,7 @@ pkgname=tilde-podcast-bin _pkgname=Tilde pkgver=1.0.0 _electronversion=10 -pkgrel=7 +pkgrel=8 pkgdesc="Podcast client to listen to all you favorite podcasts" arch=('x86_64') url="https://github.com/paologiua/tilde" @@ -11,7 +11,7 @@ license=('MIT') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - "electron${_electronversion}-bin" + "electron${_electronversion}" ) makedepends=( 'fuse2' @@ -23,11 +23,12 @@ source=( ) sha256sums=('36d92737e95db21231d580de2dd28b8d970f0872dec4f4f8e2e7143742f83702' 'f1492bf906d1183083c07f5074b51ea36dc616136bf76d9f87e9a535a5345080' - '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/tilde-podcast.sh b/tilde-podcast.sh index 7ddcaab8d734..4cfe3ac09dd8 100644 --- a/tilde-podcast.sh +++ b/tilde-podcast.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 |