aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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