Print usage when called without flags.

This commit is contained in:
Shy 2024-08-08 19:37:55 +02:00
parent b69fad5068
commit b764a46ded

7
wled
View file

@ -70,10 +70,15 @@ current_brightness() {
sed -n 's/.*"state"[[:space:]]*:[[:space:]]*{[^}]*"bri"[[:space:]]*:[[:space:]]*\([0-9]\{1,3\}\).*/\1/p'
}
if test $# -eq 0; then
print_help
exit 0
fi
# Parse instance argument and store hostnames.
while test $# -gt 0; do
case "$1" in
""|-h|--help) # Missing instance parameter.
-h|--help)
print_help
exit 0
;;