]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
move check mp3 programs on top
authorBastian Dehn <hhaalo@arcor.de>
Sun, 30 Aug 2026 08:39:36 +0000 (10:39 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 30 Aug 2026 08:39:36 +0000 (10:39 +0200)
libs/mp3.sh

index 5d51b1f7b38042fa34fdbe547f4d21d887008c03..8c6c8096cddbe14e630bb8730c2f8ff2dc8d72e1 100644 (file)
@@ -1,5 +1,21 @@
 #!/bin/bash
 
+check_mp3_programs()
+{
+       command -v flac > /dev/null \
+               || errlog "command flac not found" \
+               || return $?
+       command -v lame > /dev/null \
+               || errlog "command lame not found" \
+               || return $?
+       command -v eyeD3 > /dev/null \
+               || errlog "command eyeD3 not found" \
+               || return $?
+       command -v parallel > /dev/null \
+               || errlog "command parallel not found" \
+               || return $?
+}
+
 read_flac_to_mp3_tags()
 {
        local inputfile="$1"
@@ -95,26 +111,9 @@ convert_flac_to_mp3()
                flac_to_mp3 {}
 }
 
-check_mp3_programs()
-{
-       command -v flac > /dev/null \
-               || errlog "command flac not found" \
-               || return $?
-       command -v lame > /dev/null \
-               || errlog "command lame not found" \
-               || return $?
-       command -v eyeD3 > /dev/null \
-               || errlog "command eyeD3 not found" \
-               || return $?
-       command -v parallel > /dev/null \
-               || errlog "command parallel not found" \
-               || return $?
-}
-
 execute()
 {
        local workdir="$1"
-
        convert_flac_to_mp3 "$workdir" || return $?
 }