move weatherreport to $XDG_CACHE_HOME (#1140)

This commit is contained in:
Rainer Wittmaack 2022-07-07 08:32:34 -05:00 committed by GitHub
parent c20acc474f
commit f1e68ed533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
# If we have internet, get a weather report from wttr.in and store it locally. # If we have internet, get a weather report from wttr.in and store it locally.
# You could set up a shell alias to view the full file in a pager in the # You could set up a shell alias to view the full file in a pager in the
# terminal if desired. This function will only be run once a day when needed. # terminal if desired. This function will only be run once a day when needed.
weatherreport="${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;} getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;}
# Some very particular and terse stream manipulation. We get the maximum # Some very particular and terse stream manipulation. We get the maximum