git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <coding _ lirion.net> 2014-08-10 03:33:16 +0200
committerHarald Pfeiffer <coding _ lirion.net> 2014-08-10 03:33:16 +0200
commite58068694698ff4f426ec07396a829f1f24ff6b5 (patch)
treecc668c24184e94d72846505f129e5e16b014c7b6
parent9a7bdd871431148cee77aef5d7286cdaca2a06be (diff)
downloadmp3dir2html-e58068694698ff4f426ec07396a829f1f24ff6b5.tar.bz2
+help, +option -d for directory to be scanned
-rwxr-xr-xbin/mp3dirlist14
1 files 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 {