]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
checks and workdir before convert
authorBastian Dehn <hhaalo@arcor.de>
Sun, 23 Mar 2025 19:43:20 +0000 (20:43 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 23 Mar 2025 19:43:20 +0000 (20:43 +0100)
albentohandy

index 9658f1b156cbb9eb34fe7a1c8f6b00784d55a3a2..58f096de4e9bd00268b9930ba48bd4e97934597f 100755 (executable)
@@ -420,27 +420,14 @@ ReadArguments()
        done
 }
 
-ExistsAlbumlist()
+ConvertProcess()
 {
-       local albumlist="$1"
-
        if [ ! -f "$albumlist" ]; then
-               printf "\nalbumlist does not exists\n\n"
-               exit
-       fi
-}
-
-CreateWorkDirectory()
-{
-       local readonly WORK="$1"
-
-       if [ ! -d $WORK ]; then
-               mkdir $WORK
+               echo "ERROR: albumlist doas not exists"
+               exit 1
        fi
-}
 
-ConvertProcess()
-{
+       mkdir -p $WORK
        printf "\nPhase %02d of %02d:\n" $((curphase++)) $phase
        printf "create symlinks of flac's in %s\n" "$WORK"
        MakeSymlinksToWork "$WORK" "$MUSICPATH" "$albumlist"
@@ -498,9 +485,6 @@ main()
 
        ReadArguments $*
 
-       ExistsAlbumlist "$albumlist"
-       CreateWorkDirectory "$WORK"
-
        ConvertProcess
        AdvancedFeatures
 }