diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-07 10:23:18 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-07 10:23:18 +0530 |
commit | 9238403eb9a94697d0d0062399ccdb07b5a909ad (patch) | |
tree | ef388dafd4a9c4df222db45fc2ce65627fee930d | |
parent | f0e317129de946083e0b82f9ff560459f72ea177 (diff) |
now the temperature works with foggy weather
-rwxr-xr-x | scripts/weather | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/weather b/scripts/weather index cc0ac150..f960d040 100755 --- a/scripts/weather +++ b/scripts/weather @@ -1,9 +1,9 @@ -#!/bin/bash +#!/bin/zsh get_current_temp() { - if [ $stat == "Smoke" ]; then + if [ $stat = "Smoke" ]; then temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $4 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g") - elif [ $stat == "Haze" ]; then + elif [ $stat = "Haze" ] || [ $stat = "Fog" ]; then temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $9 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g") fi |