aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-07 10:23:18 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-07 10:23:18 +0530
commit9238403eb9a94697d0d0062399ccdb07b5a909ad (patch)
treeef388dafd4a9c4df222db45fc2ce65627fee930d
parentf0e317129de946083e0b82f9ff560459f72ea177 (diff)
now the temperature works with foggy weather
-rwxr-xr-xscripts/weather6
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