Fix weather module

This commit is contained in:
Your Name 2020-11-01 12:59:22 +01:00
parent 88628f81aa
commit 8c90b3439d

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/local/bin/bash
# Deps:
# curl
@ -6,10 +6,10 @@
get_weather()
{
curl -s v2.wttr.in | grep -e "Weather" | sed 's/C,.*/C/g; s/+//g; s/.*\[0m.//g; s/.//2'
curl -s v2.wttr.in | grep -e "Weather" | sed -n 2p | sed s/Weather://g | sed 's/,//g' | sed 's/+//g' | sed 's/°C.*/°C/' | sed 's/.*m//'
}
if [ $(( 10#$(date +'%S') % 30 )) -eq 0 ]; then
if [ $(( 10#$(date '+%S') % 30 )) -eq 0 ]; then
get_weather
fi