Print status message only if stdout is a terminal.
This commit is contained in:
parent
f8bb69594c
commit
b69fad5068
1 changed files with 1 additions and 1 deletions
2
wled
2
wled
|
@ -131,7 +131,7 @@ for wled_host in $host_list; do
|
||||||
api_resp=$(curl_send "{'ps':$1}" "http://$wled_host/json")
|
api_resp=$(curl_send "{'ps':$1}" "http://$wled_host/json")
|
||||||
;;
|
;;
|
||||||
l|list) # List presets.
|
l|list) # List presets.
|
||||||
printf "loading ...\r"
|
test -t 1 && printf 'connecting ...\r'
|
||||||
active_ps=$(active_preset "$wled_host")
|
active_ps=$(active_preset "$wled_host")
|
||||||
curl_fetch "http://$wled_host/presets.json" | \
|
curl_fetch "http://$wled_host/presets.json" | \
|
||||||
# Insert newline in front of every preset slice.
|
# Insert newline in front of every preset slice.
|
||||||
|
|
Loading…
Reference in a new issue