Fix sb-price after bash -> dash change

This commit is contained in:
appeasementPolitik 2024-07-17 12:01:35 +02:00 committed by GitHub
parent 628ed4dc99
commit efc1b322af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,9 @@ filestat="$(stat -c %x "$pricefile" 2>/dev/null)"
[ -d "$dir" ] || mkdir -p "$dir"
updateprice() { curl -sf -m 1 --fail-early $denom.$url/{1$target,$target$interval} --output "$pricefile" --output "$chartfile" ||
updateprice() { curl -sf \
--fail-early "${denom}.${url}/1${target}" "${denom}.${url}/${target}${interval}" \
--output "$pricefile" --output "$chartfile" ||
rm -f "$pricefile" "$chartfile" ;}
[ "${filestat%% *}" != "$(date '+%Y-%m-%d')" ] &&