Derive $NAME from executable name

This commit is contained in:
Xavier Moffett 2025-03-22 19:31:56 -04:00
parent a97434bfcf
commit ec28af9a43
Signed by: Sapphirus
GPG key ID: A6C061B2CEA1A7AC

View file

@ -25,10 +25,13 @@
set -eEo pipefail
# Meta
VERSION="1.0"
NAME="${0##*/}"
OUTPUT="@DEFAULT_AUDIO_SINK@"
# Declare input and output sinks
SOURCE="@DEFAULT_AUDIO_SOURCE@"
OUTPUT="@DEFAULT_AUDIO_SINK@"
main() {
local action bypass
@ -123,14 +126,14 @@ invalid_option() {
}
version() {
echo -e "volbash $VERSION - simple wpctl wrapper
echo -e "$NAME $VERSION - simple wpctl wrapper
Copyright (C) 2025 Xavier Moffett\n
Licensed under the MIT License\n"
exit
}
help() {
echo -e "Usage: volbash [OPERATION] | [OPTION]
echo -e "Usage: $NAME [OPERATION] | [OPTION]
Operations:
up Increment volume