Handle missing weather data
This commit is contained in:
parent
f2d9d0f1ea
commit
85d88f7d74
1 changed files with 6 additions and 1 deletions
|
|
@ -36,6 +36,11 @@ case "${battery_state}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
weather=$(cat /tmp/weather-report.txt)
|
||||
weather_file="/tmp/weather-report.txt"
|
||||
if [ -f ${weather_file} ]; then
|
||||
weather=$(cat ${weather_file})
|
||||
else
|
||||
weather=""
|
||||
fi
|
||||
|
||||
echo ${weather} 📆${today} ⏲${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue