diff options
author | zxp19821005 | 2024-05-15 15:49:30 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-15 15:49:30 +0800 |
commit | e26db5048447b5070775739e5a502e04e5ac5fa3 (patch) | |
tree | 55afd3e75fde49524447f063d01490aed0cdddd6 | |
parent | a68fac4540d21d6a0b79a195660d017b51cf78d4 (diff) | |
download | aur-thoughts-bin.tar.gz |
update to 0.9.12
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | thoughts.sh | 21 |
3 files changed, 29 insertions, 15 deletions
@@ -1,19 +1,19 @@ pkgbase = thoughts-bin pkgdesc = 一个还算强大的Web思维导图。A relatively powerful web mind map. - pkgver = 0.9.10 + pkgver = 0.9.12 pkgrel = 1 url = https://wanglin2.github.io/mind-map/#/index arch = x86_64 license = MIT makedepends = fuse2 depends = electron23 - provides = thoughts=0.9.10 + provides = thoughts=0.9.12 conflicts = thoughts - source = thoughts-0.9.10.AppImage::https://github.com/wanglin2/mind-map/releases/download/electron-0.9.10/-0.9.10.AppImage - source = LICENSE-0.9.10::https://raw.githubusercontent.com/wanglin2/mind-map/electron-0.9.10/LICENSE + source = thoughts-0.9.12.AppImage::https://github.com/wanglin2/mind-map/releases/download/electron_0.9.12/-0.9.12.AppImage + source = LICENSE-0.9.12::https://raw.githubusercontent.com/wanglin2/mind-map/electron_0.9.12/LICENSE source = thoughts.sh - sha256sums = 364cd7fd2589e9b80448343c74301f64d92c0d72e6f7cd771c278c869bde8c92 + sha256sums = c24786621ec58416f9bb5c9fe3472f097b43980806b8ca43bed683b27bd6d868 sha256sums = 8a19b651678a6a644640524d984ed89d0b9a78c662545715218a05130c7329c7 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d pkgname = thoughts-bin @@ -1,6 +1,6 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=thoughts-bin -pkgver=0.9.10 +pkgver=0.9.12 _electronversion=23 pkgrel=1 pkgdesc="一个还算强大的Web思维导图。A relatively powerful web mind map." @@ -17,17 +17,18 @@ makedepends=( 'fuse2' ) source=( - "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/electron-${pkgver}/-${pkgver}.AppImage" - "LICENSE-${pkgver}::https://raw.githubusercontent.com/wanglin2/mind-map/electron-${pkgver}/LICENSE" + "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/electron_${pkgver}/-${pkgver}.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/wanglin2/mind-map/electron_${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) -sha256sums=('364cd7fd2589e9b80448343c74301f64d92c0d72e6f7cd771c278c869bde8c92' +sha256sums=('c24786621ec58416f9bb5c9fe3472f097b43980806b8ca43bed683b27bd6d868' '8a19b651678a6a644640524d984ed89d0b9a78c662545715218a05130c7329c7' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d') 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" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" diff --git a/thoughts.sh b/thoughts.sh index 7ddcaab8d734..398398461fee 100644 --- a/thoughts.sh +++ b/thoughts.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 |