summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgigamicro2024-04-15 19:02:01 -0400
committergigamicro2024-04-15 19:02:01 -0400
commit92b7aeaaf2554686e3f63b6dca3a8d72b4db2e7c (patch)
tree9cf499927ae0e663687d4d92ded89ee1657bdb37
parent1f1c5afe8ecb40bf065f9f508e0f202d6d918fd5 (diff)
downloadaur-92b7aeaaf2554686e3f63b6dca3a8d72b4db2e7c.tar.gz
move update to after logloc validation
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--wfinfo.sh14
3 files changed, 9 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3d5babd5c47d..a3991a2adcc7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -20,6 +20,6 @@ pkgbase = wfinfo-ng-git
source = wfinfo-ng::git+https://github.com/knoellle/wfinfo-ng.git
source = wfinfo.sh
sha256sums = SKIP
- sha256sums = 1ed7ff69a3c5b0dd9fc6b7efd2b936b03ccb95348bcceecbd861a52bce8f43fe
+ sha256sums = c3c00bc85a62d59742ff16bae95b41b88829439162db9b812c8f1a25dae768ac
pkgname = wfinfo-ng-git
diff --git a/PKGBUILD b/PKGBUILD
index d533634f8518..ab3b692a9c7b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,7 @@ optdepends=('mlocate: to autodetect EE.log location')
provides=('wfinfo')
#conflicts=('wfinfo')
source=("$_pkgname::git+https://github.com/knoellle/wfinfo-ng.git" 'wfinfo.sh')
-sha256sums=('SKIP' '1ed7ff69a3c5b0dd9fc6b7efd2b936b03ccb95348bcceecbd861a52bce8f43fe')
+sha256sums=('SKIP' 'c3c00bc85a62d59742ff16bae95b41b88829439162db9b812c8f1a25dae768ac')
pkgver() {
cd "$srcdir/$_pkgname"
diff --git a/wfinfo.sh b/wfinfo.sh
index e85e186be406..47a7a8f7a7a1 100644
--- a/wfinfo.sh
+++ b/wfinfo.sh
@@ -2,13 +2,6 @@
CACHEDIR=~/.cache/wfinfo-ng
mkdir -pv "$CACHEDIR"
cd "$CACHEDIR" || { echo Could not enter cache directory, exiting...; exit 1; }
-wfinfo-update ||
-if [ -f "$CACHEDIR/filtered_items.json" ] && [ -f "$CACHEDIR/prices.json" ]; then
- echo Update failed, continuing...
-else
- echo Update failed and no cached price info, exiting...
- exit 2
-fi
# EE.log location as first parameter?
logloc="$1"; [ "$#" -ge 1 ] && shift
logloc="${logloc:-$(
@@ -27,6 +20,13 @@ if ! [ -r "$logloc" ]; then
echo Invalid or unreadable EE.log location \""$logloc"\", exiting...
exit 4
fi
+wfinfo-update ||
+if [ -f "$CACHEDIR/filtered_items.json" ] && [ -f "$CACHEDIR/prices.json" ]; then
+ echo Update failed, continuing...
+else
+ echo Update failed and no cached price info, exiting...
+ exit 2
+fi
# wfinfo-ng will create multiple PNG files in $PWD
# this would delete them, but we've already got a cache directory anyway
#cleanup(){ echo Exit; rm ./*.png; exit 130; }; trap cleanup INT