FIX: Various Fixes for justZipIt.sh and convert.sh

This commit is contained in:
Nikurasu 2021-10-27 20:20:59 +02:00
parent b950960a76
commit f51fce52ac
4 changed files with 11 additions and 14 deletions

View File

@ -3,7 +3,7 @@ compressionlevel=5
while getopts l:h options
do
case $options in
l) compressionlevel="$OPTARG";;
l) compressionlevel=${OPTARG};;
h) printf "\nLittle Bash script for converting all sub-folders of a folder\n\nUsage:\n.justZipIt.sh (or your alias) [-l compression level]\n\nStandard values:\ncompression level: 5\n\n"
exit 2;;
esac

Binary file not shown.

23
ffmpegConvertFolder/convert.sh Normal file → Executable file
View File

@ -18,21 +18,18 @@ typeofsecondparameter() { # Is the output parameter lossless or lossy
fi
}
outputogg() { # Change the file extension of the output to ogg instead of libvorbis
if [ "$output" == "libvorbis" ];
libvorbistogg() { # Change the file extension of the output or input to ogg instead of libvorbis
inputOrOutput=$1
if [ "$input" == "libvorbis" ] || [ "$output" == "libvorbis" ];
then
extension="ogg"
else
extension="$output"
fi
}
inputogg() { # Change the file extension of the output to ogg instead of libvorbis
if [ "$input" == "libvorbis" ];
then
extension="ogg"
else
extension="$input"
if [ "$inputOrOutput" == "in" ]
then
extension="$input"
else
extension="$output"
fi
fi
}
@ -94,7 +91,7 @@ else
smallhelp
elif [ "$inputfiletype" == "lossless" ] && [ "$outputfiletype" == "lossy" ]; # Lossless to Lossy
then
outputogg
libvorbistogg "out"
mkdir "$output"
for i in *."$input";
do

Binary file not shown.