apply shellcheck recommendations on openweathermap-fullfeatured

This commit is contained in:
x70b1 2018-04-17 04:13:13 +02:00
parent d5269e062e
commit d91c5c7ae5

View File

@ -77,11 +77,11 @@ if [ ! -z "$current" ] && [ ! -z "$forecast" ]; then
now=$(date +%s) now=$(date +%s)
if [ "$sun_rise" -gt "$now" ]; then if [ "$sun_rise" -gt "$now" ]; then
daytime="$(get_duration "$(($sun_rise-$now))")" daytime="$(get_duration "$((sun_rise-now))")"
elif [ "$sun_set" -gt "$now" ]; then elif [ "$sun_set" -gt "$now" ]; then
daytime="$(get_duration "$(($sun_set-$now))")" daytime="$(get_duration "$((sun_set-now))")"
else else
daytime="$(get_duration "$(($sun_rise-$now))")" daytime="$(get_duration "$((sun_rise-now))")"
fi fi
echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime" echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"