Add proper parsing of help flag

This commit is contained in:
Sem
2026-07-20 13:52:10 +02:00
parent da3b555e6c
commit 7251f9d092

View File

@@ -32,15 +32,21 @@ function print_help()
echo "\tThis is the same as running the script for each single file in the list" echo "\tThis is the same as running the script for each single file in the list"
} }
if [ -z "$2" ] if [ -z "$1" ]
then echo "use the -h flag to get help on how to use this script"
echo "staying in current directory" exit 0
else fi
if [ "$1" = "-h" ] if [ "$1" = "-h" ]
then then
print_help print_help
exit 0 exit 0
elif [ "$1" = "-l" ] fi
if [ -z "$2" ]
then
echo "staying in current directory"
else
if [ "$1" = "-l" ]
then then
echo "Looping through $2" echo "Looping through $2"
while read flacfile; do while read flacfile; do