From 738eb5a5378d3b612c863b8e08aa6eed29adb0e6 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 25 Nov 2017 00:02:58 +0100 Subject: [PATCH] add: function SetDefaultVariables --- albentohandy | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/albentohandy b/albentohandy index 4256365..17efd2e 100755 --- a/albentohandy +++ b/albentohandy @@ -171,6 +171,17 @@ ExistsBasicProgramms() { fi } +SetDefaultVariables() { + albumlist="albumlist" + parallelopts=":" + curphase=1 + phase=3 + checksum=false + mkzip=false + removework=false + cptodest=false +} + main() { WORK="$(pwd)/work.$$" # temporary working directory SCRIPTPATH="/usr/bin" # path to flactomp3v2 and notify.sh script @@ -181,15 +192,7 @@ main() { ExistsScripts "$SCRIPTPATH" - # set defaults - albumlist="albumlist" - parallelopts=":" - curphase=1 - phase=3 - checksum=false - mkzip=false - removework=false - cptodest=false + SetDefaultVariables # read parameters while getopts "chi:m:S:rw:z:" optname; do -- 2.47.3