]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
change check programs by load libs
authorBastian Dehn <hhaalo@arcor.de>
Fri, 18 Jul 2025 14:08:28 +0000 (16:08 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 18 Jul 2025 14:08:28 +0000 (16:08 +0200)
albentohandy
libs/flac.sh
libs/mp3.sh
libs/opus.sh
libs/voribs.sh

index 4ffd45575a336aea4cbeabc9682f52cc8b15b4f8..f1ddbd2161f26f0adca2daa4de92f047828319d5 100755 (executable)
@@ -48,10 +48,10 @@ load_libraries()
                || errlog "library flac.sh not found" \
                || return $?
 
-       source "$LIBS/voribs.sh"
-       source "$LIBS/mp3.sh"
-       source "$LIBS/opus.sh"
-       source "$LIBS/flac.sh"
+       source "$LIBS/voribs.sh" || return $?
+       source "$LIBS/mp3.sh" || return $?
+       source "$LIBS/opus.sh" || return $?
+       source "$LIBS/flac.sh" || return $?
 }
 
 cleanup_flac()
@@ -122,30 +122,6 @@ load_config()
 
 check_programms()
 {
-       command -v flac > /dev/null \
-               || errlog "command flac not found" \
-               || return $?
-       command -v metaflac > /dev/null \
-               || errlog "command metaflac not found" \
-               || return $?
-       command -v oggenc > /dev/null \
-               || errlog "command oggenc not found" \
-               || return $?
-       command -v lame > /dev/null \
-               || errlog "command lame not found" \
-               || return $?
-       command -v opusenc > /dev/null \
-               || errlog "command opusenc not found" \
-               || return $?
-       command -v vorbiscomment > /dev/null \
-               || errlog "command vorbiscomment 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 $?
        command -v rsync > /dev/null \
                || errlog "command rsync not found" \
                || return $?
index f07d0d5efde504db8b86c49a743437875507ec9f..8772bb111b4c11937be5d89f87e13f03a3492eda 100644 (file)
@@ -10,3 +10,12 @@ picture_to_flac()
                $file
        done
 }
+
+check_flac_programs()
+{
+       command -v metaflac > /dev/null \
+               || errlog "command metaflac not found" \
+               || return $?
+}
+
+check_flac_programs
index c8e7be056966aad6bc093c35af36e1f68ac5a751..f8f0d4f5de429cb9874dc22953657e10981c77b9 100644 (file)
@@ -85,3 +85,21 @@ convert_flac_to_mp3()
                --progress \
                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 $?
+}
+
+check_mp3_programs
index 443a79b7123149e0d51f66ddb3d7f258f9058d2d..81a954bafff6eaf95b62ae21c29bf9bb17425747 100644 (file)
@@ -21,3 +21,15 @@ convert_flac_to_opus()
                --progress \
                flac_to_opus {}
 }
+
+check_opus_programs()
+{
+       command -v opusenc > /dev/null \
+               || errlog "command opusenc not found" \
+               || return $?
+       command -v parallel > /dev/null \
+               || errlog "command parallel not found" \
+               || return $?
+}
+
+check_opus_programs
index 09940dcd8a350a520f31f9c47d6de8a4a2a23342..673cf8d2d9d825de1d7b8bdf35ca8df9a7524a59 100644 (file)
@@ -89,3 +89,24 @@ convert_flac_to_ogg()
                | parallel --will-cite --ungroup --eta --progress \
                flac_to_vorbis "{}"
 }
+
+check_vorbis_programs()
+{
+       command -v flac > /dev/null \
+               || errlog "command flac not found" \
+               || return $?
+       command -v metaflac > /dev/null \
+               || errlog "command metaflac not found" \
+               || return $?
+       command -v oggenc > /dev/null \
+               || errlog "command oggenc not found" \
+               || return $?
+       command -v vorbiscomment > /dev/null \
+               || errlog "command vorbiscomment not found" \
+               || return $?
+       command -v parallel > /dev/null \
+               || errlog "command parallel not found" \
+               || return $?
+}
+
+check_vorbis_programs