From: Bastian Dehn Date: Sun, 30 Aug 2026 08:47:31 +0000 (+0200) Subject: move vorbis program check top X-Git-Tag: v1.0.0^2~24 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=c1ae957908df29898f1c61e736dabae51df2fee9;p=albentohandy.git move vorbis program check top --- diff --git a/libs/vorbis.sh b/libs/vorbis.sh index 7b849a3..7138e85 100644 --- a/libs/vorbis.sh +++ b/libs/vorbis.sh @@ -1,5 +1,24 @@ #!/bin/bash +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 $? +} + read_flac_to_ogg_tags() { local inputfile="$1" @@ -90,25 +109,6 @@ convert_flac_to_ogg() 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 $? -} - execute() { local workdir="$1"