Print status message only if stdout is a terminal.

This commit is contained in:
Shy 2024-08-07 23:10:02 +02:00
parent f8bb69594c
commit b69fad5068

2
wled
View file

@ -131,7 +131,7 @@ for wled_host in $host_list; do
api_resp=$(curl_send "{'ps':$1}" "http://$wled_host/json")
;;
l|list) # List presets.
printf "loading ...\r"
test -t 1 && printf 'connecting ...\r'
active_ps=$(active_preset "$wled_host")
curl_fetch "http://$wled_host/presets.json" | \
# Insert newline in front of every preset slice.