summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-05-13 09:12:11 +0800
committerzxp198210052024-05-13 09:12:11 +0800
commitd9746c38b41b63121e2b2d4c145037b38d2401a0 (patch)
tree751ed6fabaf82bc5dd376b20b07f1e937ab65bfe
parent60b3bf61b9084b45b923db7822d5c28f4875c844 (diff)
downloadaur-pear-rec-bin.tar.gz
update to 1.3.17
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD7
-rw-r--r--pear-rec.sh21
3 files changed, 26 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1d65bb1001bf..f1bea5d88a40 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
pkgbase = pear-rec-bin
pkgdesc = An open-source, cross-platform terminal for seamless workflows
- pkgver = 1.3.16
+ pkgver = 1.3.17
pkgrel = 1
url = https://027xiguapi.github.io/pear-rec/
arch = x86_64
license = Apache-2.0
depends = electron29
- provides = pear-rec=1.3.16
+ provides = pear-rec=1.3.17
conflicts = pear-rec
- source = pear-rec-1.3.16.deb::https://github.com/027xiguapi/pear-rec/releases/download/v1.3.16/pear-rec-Linux-1.3.16.deb
+ source = pear-rec-1.3.17.deb::https://github.com/027xiguapi/pear-rec/releases/download/v1.3.17/pear-rec-Linux-1.3.17.deb
source = pear-rec.sh
- sha256sums = 4f1bf1805f2c4d3259aae860beb25f08d9d7fe48053587f4001a809cff8edd20
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+ sha256sums = ef86d723e805c7449078cefe54fd7345c793f90e1d1bd3e55a4792ab5587a5ce
+ sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d
pkgname = pear-rec-bin
diff --git a/PKGBUILD b/PKGBUILD
index 4c455a1a60a0..8f859abd6adb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=pear-rec-bin
_pkgname="@${pkgname%-bin}desktop"
-pkgver=1.3.16
+pkgver=1.3.17
_electronversion=29
pkgrel=1
pkgdesc="An open-source, cross-platform terminal for seamless workflows"
@@ -20,12 +20,13 @@ source=(
"${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}-Linux-${pkgver}.deb"
"${pkgname%-bin}.sh"
)
-sha256sums=('4f1bf1805f2c4d3259aae860beb25f08d9d7fe48053587f4001a809cff8edd20'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+sha256sums=('ef86d723e805c7449078cefe54fd7345c793f90e1d1bd3e55a4792ab5587a5ce'
+ '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@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
diff --git a/pear-rec.sh b/pear-rec.sh
index 7ddcaab8d734..398398461fee 100644
--- a/pear-rec.sh
+++ b/pear-rec.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