cleaning
This commit is contained in:
parent
f12dbece18
commit
4695ff98ca
@ -28,14 +28,16 @@ unknown_system(){
|
||||
|
||||
usage(){
|
||||
printf "\
|
||||
Usage: %b [function] (argument)\n" "$argv0"
|
||||
Usage: %b {function} (operand)\n" "$argv0"
|
||||
printf "\
|
||||
Functions:
|
||||
'+' - shortcut to \"relative \$2\"
|
||||
'-' - shortcut to \"relative -\$2\"
|
||||
absolute - change sound output to absolute unit
|
||||
help - print this help output
|
||||
help,'' - print this help output
|
||||
mute - toggle mute/unmute
|
||||
relative - change sound output relative to current status
|
||||
status - print current sound output in system unit
|
||||
status - print current sound output in system unit \
|
||||
"
|
||||
printf "\
|
||||
The options are matched with [char]*. So \"%b help\"
|
||||
@ -45,9 +47,10 @@ works the same as \"%b h\".
|
||||
exit 1
|
||||
}
|
||||
|
||||
# $1 becomes 'help' if previously empty
|
||||
[ -n "$1" ] \
|
||||
&& argv1="$1" \
|
||||
|| argv1=s
|
||||
|| argv1=help
|
||||
|
||||
case "$argv1" in
|
||||
#
|
||||
@ -99,7 +102,6 @@ case "$argv1" in
|
||||
&& "$argv0" r -"$2" \
|
||||
|| usage
|
||||
;;
|
||||
(h*) usage ;;
|
||||
(m*)
|
||||
[ -z "$2" ] || usage
|
||||
# restore previous volume if there is one
|
||||
@ -139,5 +141,6 @@ case "$argv1" in
|
||||
fi
|
||||
"$argv0" a $newval
|
||||
exit $? ;;
|
||||
(*) usage
|
||||
(h*) usage ;;
|
||||
(*) usage ;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user