blob: 710c0dde0df8d4d06911ef1f04eb69c82f8d2109 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
CACHELOC=~/.cache/wfinfo-ng
mkdir -pv "$CACHELOC"
cd "$CACHELOC" || { echo Could not enter cache directory, exiting...; exit 1; }
wfinfo-update ||
if [ -f "$CACHELOC/filtered_items.json" ] && [ -f "$CACHELOC/prices.json" ]; then
echo Update failed, continuing...
else
echo Update failed and no cached price info, exiting...
exit 1
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
exec wfinfo-ng "${1-$(
# find EE.log with most recent modification time
locate \*/Warframe/EE.log |
xargs -rd \\n stat -c '%Y %n' |
sort -n | tail -n 1 | cut -d ' ' -f 2-
)}"
|