From: Bastian Dehn Date: Sun, 16 Jul 2017 18:34:59 +0000 (+0200) Subject: add: usage X-Git-Tag: v1.0.0^2~98 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=12acba581afff73074e5c108b381f3f9d3ba54a7;p=albentohandy.git add: usage --- diff --git a/albentohandy b/albentohandy index 2cc832e..98ad696 100755 --- a/albentohandy +++ b/albentohandy @@ -4,6 +4,28 @@ ### copy to other folder. It works on parallel, you can ### use it in a cluster with Parameter -S. +Usage() { + cat <<- EOF + +NAME + albumtohandy - konvertiert flac to mp3 von einer Sammlung + +SYNOPSIS + albentohandy [-c] [-i ]/[,[]/]..] [-r] [-z input Datei default=albumlist + -m kopiert das Arbeitsverzeichnis in das angegeben Zielverzeichnis + -S []/ parallel mehr information in der Manpage von parallel + -r löscht das Arbeitsverzeichnis wenn -z oder -m angegeben ist + -w das Arbeitsverzeichnis angegeben + -z erstellt ein Zip Datei + + EOF +} + MakeSymlinksToWork() { local readonly workdir="$1" local readonly musicdir="$2" @@ -131,12 +153,16 @@ main() { cptodest=false # read parameters - while getopts ":ci:m:S::rw:z:" optname; do + while getopts ":c:hi:m:S::rw:z:" optname; do case "$optname" in "c") checksum=true ((phase++)) ;; + "h") + Usage + exit 0 + ;; "i") albumlist="$OPTARG" ;;