Print usage when called without flags.
This commit is contained in:
parent
b69fad5068
commit
b764a46ded
1 changed files with 6 additions and 1 deletions
7
wled
7
wled
|
@ -70,10 +70,15 @@ current_brightness() {
|
||||||
sed -n 's/.*"state"[[:space:]]*:[[:space:]]*{[^}]*"bri"[[:space:]]*:[[:space:]]*\([0-9]\{1,3\}\).*/\1/p'
|
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.
|
# Parse instance argument and store hostnames.
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
""|-h|--help) # Missing instance parameter.
|
-h|--help)
|
||||||
print_help
|
print_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue