From 9238403eb9a94697d0d0062399ccdb07b5a909ad Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 7 Dec 2020 10:23:18 +0530 Subject: now the temperature works with foggy weather --- scripts/weather | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3