From b9731525b995596b16c8863d95f0801683f2a3c2 Mon Sep 17 00:00:00 2001 From: cb Date: Sun, 18 Jun 2023 01:50:09 +0200 Subject: [PATCH] weather: fixed outdated url and test -d --- usr_share_grml/zsh/functions/weather | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr_share_grml/zsh/functions/weather b/usr_share_grml/zsh/functions/weather index b89e597..bf303bf 100644 --- a/usr_share_grml/zsh/functions/weather +++ b/usr_share_grml/zsh/functions/weather @@ -17,7 +17,7 @@ local PLACE="${1:u}" local DIR="${HOME}/.weather" local LOG="${DIR}/log" -if [[ -d ${DIR} ]]; then +if ! [[ -d ${DIR} ]]; then print -n "Creating ${DIR}: " mkdir ${DIR} print 'done' @@ -27,7 +27,7 @@ print "Retrieving information for ${PLACE}:" print cd ${DIR} && \ wget -T 10 --no-verbose --output-file=$LOG --timestamping \ - http://weather.noaa.gov/pub/data/observations/metar/decoded/$PLACE.TXT + https://tgftp.nws.noaa.gov/data/observations/metar/decoded/$PLACE.TXT if [[ $? -eq 0 ]]; then if [[ -n "$VERBOSE" ]] ; then -- 2.1.4