Parameter handling

This commit is contained in:
Jeroen De Meerleer 2020-02-12 13:53:58 +01:00
parent 1d5c6b45ff
commit ad72437402
1 changed files with 4 additions and 8 deletions

View File

@ -141,9 +141,8 @@ GetOptions() {
verbose=2
if [[ $2 != "" ]]; then
verbose=${2}
shift
fi
shift
shift 2
;;
-h|--help)
help=true
@ -173,10 +172,9 @@ GetOptions() {
bitrate=192
if [[ $2 != "" ]]; then
bitrate=${2}
shift
fi
VerboseOutput 1 "Converted bitrate is ${bitrate}"
shift
shift 2
;;
-a|--resize-art)
VerboseOutput 0 "--resize-art given"
@ -184,9 +182,8 @@ GetOptions() {
coverartsize=200
if [[ $2 != "" ]]; then
coverartsize=${2}
shift
fi
shift
shift 2
VerboseOutput 1 "Album art will ${coverartsize}px wide"
;;
-j|--jobs)
@ -195,9 +192,8 @@ GetOptions() {
jobcount="-2"
if [[ $2 != "" ]]; then
jobcount=${2}
shift
fi
shift
shift 2
VerboseOutput 1 "multithreading will use ${jobcount} threads"
;;
--)