summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-07-10 16:26:33 +0800
committerzxp198210052024-07-10 16:26:33 +0800
commit7a6d3a1c600992ad9a7c08cecadddf85198feee9 (patch)
tree5a59ecc482c20f7ffe8b7a98e619bd872e78660f
parentf5c0c3c90233120a63ccd85101c0b9b3eea2156e (diff)
downloadaur-7a6d3a1c600992ad9a7c08cecadddf85198feee9.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--password-strength-checker.sh21
3 files changed, 22 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f25714062222..fd528ab61795 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = password-strength-checker-bin
pkgdesc = Password Strength Measuring or checking application.
pkgver = 2.3.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/ArchismanKarmakar/Password-Strength-Check-ElectronJS-CPP
arch = x86_64
license = MIT
@@ -11,6 +11,6 @@ pkgbase = password-strength-checker-bin
source = password-strength-checker-2.3.0.deb::https://github.com/ArchismanKarmakar/Password-Strength-Check-ElectronJS-CPP/releases/download/v2.3.0Rel16032024-1000ist/password-strength-checker-using-electronjs-cpp_2.3.0_amd64.deb
source = password-strength-checker.sh
sha256sums = f73b8d74f3de7022b662ceccc05b1783e93d5ddfa172ef1e0d4abcf157b34c89
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+ sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
pkgname = password-strength-checker-bin
diff --git a/PKGBUILD b/PKGBUILD
index 9bf123e3e031..e7eab3a5b72c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ _pkgname="Password Strength Checker"
pkgver=2.3.0
_subver=Rel16032024-1000ist
_electronversion=29
-pkgrel=1
+pkgrel=2
pkgdesc="Password Strength Measuring or checking application."
arch=(
'x86_64'
@@ -21,11 +21,12 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('f73b8d74f3de7022b662ceccc05b1783e93d5ddfa172ef1e0d4abcf157b34c89'
- '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}-using-electronjs-cpp|g" \
-e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
diff --git a/password-strength-checker.sh b/password-strength-checker.sh
index 7ddcaab8d734..4cfe3ac09dd8 100644
--- a/password-strength-checker.sh
+++ b/password-strength-checker.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