From e58068694698ff4f426ec07396a829f1f24ff6b5 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Sun, 10 Aug 2014 03:33:16 +0200 Subject: +help, +option -d for directory to be scanned --- bin/mp3dirlist | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/mp3dirlist b/bin/mp3dirlist index 81eeb66..4966614 100755 --- a/bin/mp3dirlist +++ b/bin/mp3dirlist @@ -10,21 +10,25 @@ DIRLISTEX='^Susperia|^B.*hse.*nkelz' # CORE SCRIPT FROM HERE. DON'T FIDDLE IF YOU DON'T KNOW WHAT YOU'RE DOING. function m3l_help { - echo "Usage: $(basename $0) [options] [DIRECTORY...]" - exit 0 + echo "Usage: $(basename $0) [options]";echo + echo "Options:" + echo -e "\t-h\t\tPrint this help text and exit" + echo -e "\t-d DIRECTORY\tSpecify a directory to be scanned" } while getopts "ht:r:p:v" params; do case $params in "h") m3l_help + exit 0 + ;; + "d") + SDIR="$OPTARG" ;; esac done -if [ "$1" == "" ]; then +if [ "$SDIR" == "" ]; then SDIR="*" -else - SDIR="$1 $2 $3 $4 $5 $6 $7 $8" fi function m3l_rm_verb { -- cgit v1.2.3