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