From 5774f6e34b71b334e16e406226914d40bfc3438d Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 15 Mar 2020 10:53:01 -0700 Subject: [PATCH] what --- sleep_weather.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sleep_weather.sh b/sleep_weather.sh index 183f49c..fc82480 100755 --- a/sleep_weather.sh +++ b/sleep_weather.sh @@ -7,7 +7,8 @@ main() while tmux has-session &> /dev/null do ./weather.sh > ~/.tmux/plugins/tmux-dracula/weather.txt - if [ (cat ~/.tmux/plugins/tmux-dracula/weather.txt | sed -n 2p) =~ ' "error": {' ]; then + error=$(cat ~/.tmux/plugins/tmux-dracula/weather.txt | sed -n 2p) + if [ $error = ' "error": {' ]; then echo "Too Many Requests" > ~/.tmux/plugins/tmux-dracula/weather.txt break fi