summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-05-29 12:09:51 +0800
committerzxp198210052024-05-29 12:09:51 +0800
commitd77b848756d6ba3d4394055760c08562b0ef89fd (patch)
tree252166b78f9a0bc17f2d1e8753aac4918b1178ae
parent6ad596b33423f95465b0416fa572e821967c3204 (diff)
downloadaur-d77b848756d6ba3d4394055760c08562b0ef89fd.tar.gz
fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD7
-rw-r--r--swifty.sh21
3 files changed, 24 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad3b751e2ee9..32eb45b0e244 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
pkgbase = swifty-bin
pkgdesc = Free Offline-first Password Manager for MacOS, Windows and Linux.
pkgver = 0.6.13
- pkgrel = 10
+ pkgrel = 11
url = https://getswifty.pro/
arch = x86_64
license = GPL-3.0-only
- depends = electron23-bin
+ depends = electron23
provides = swifty=0.6.13
conflicts = swifty
source = swifty-0.6.13_amd64.deb::https://github.com/swiftyapp/swifty/releases/download/v0.6.13/Swifty_0.6.13_amd64.deb
source = swifty.sh
sha256sums = daa037c75ebc4e6a7b0b835f0efef2d5b1fa7bf4c2c728badbeb16d5f61a3b6a
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+ sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
pkgname = swifty-bin
diff --git a/PKGBUILD b/PKGBUILD
index 0d4bf90ce18b..5d044e8ba049 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=swifty-bin
_pkgname=Swifty
pkgver=0.6.13
_electronversion=23
-pkgrel=10
+pkgrel=11
pkgdesc="Free Offline-first Password Manager for MacOS, Windows and Linux."
arch=("x86_64")
url="https://getswifty.pro/"
@@ -12,18 +12,19 @@ license=('GPL-3.0-only')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- "electron${_electronversion}-bin"
+ "electron${_electronversion}"
)
source=(
"${pkgname%-bin}-${pkgver}_amd64.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_amd64.deb"
"${pkgname%-bin}.sh"
)
sha256sums=('daa037c75ebc4e6a7b0b835f0efef2d5b1fa7bf4c2c728badbeb16d5f61a3b6a'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+ '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app.asar|g" \
+ -e "s|@cfgdirname@|${_pkgname}|g" \
-e "s|@options@||g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
diff --git a/swifty.sh b/swifty.sh
index 7ddcaab8d734..4cfe3ac09dd8 100644
--- a/swifty.sh
+++ b/swifty.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