From e8b042e4dba1cd31ac859e832803a4153b66e9b7 Mon Sep 17 00:00:00 2001 From: Steven Saus Date: Thu, 3 Dec 2020 07:50:02 -0500 Subject: [PATCH] bugfix for conky output so "cache age" doesn't appear --- forecast.sh | 4 +++- weather.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/forecast.sh b/forecast.sh index c48229f..37be59d 100755 --- a/forecast.sh +++ b/forecast.sh @@ -144,7 +144,9 @@ while true; do fi echo $data > $dataPath else - echo "Cache age: $(($(date +%s)-$lastfileupdate)) seconds." + if [ "$Conky" != "True" ];then + echo "Cache age: $(($(date +%s)-$lastfileupdate)) seconds." + fi fi if [ $(($(date +%s)-$lastUpdateTime)) -ge 600 ]; then diff --git a/weather.sh b/weather.sh index 8617859..1daf6b9 100755 --- a/weather.sh +++ b/weather.sh @@ -122,7 +122,9 @@ while true; do fi echo $data > $dataPath else - echo "Cache age: $(($(date +%s)-$lastfileupdate)) seconds." + if [ "$Conky" != "True" ];then + echo "Cache age: $(($(date +%s)-$lastfileupdate)) seconds." + fi fi check=$(echo "$data" | grep -c -e '"cod":"40') check2=$(echo "$data" | grep -c -e '"cod":"30')