continue-on-stop

This commit is contained in:
Jeroen De Meerleer 2018-11-30 15:45:02 +01:00
parent 0d6f75726c
commit 62a820de5c

View File

@ -126,8 +126,13 @@ ConvertFiles() {
if [[ "/tmp/converted/$line" = */* ]]; then if [[ "/tmp/converted/$line" = */* ]]; then
mkdir -p "/tmp/converted/${line%/*}"; mkdir -p "/tmp/converted/${line%/*}";
fi; fi;
lame -b 192 $source/$line /tmp/converted/$line 1>/dev/null 2>/dev/null if [[ ! -f "/tmp/converted/$line" || "${source}/$file" -nt "/tmp/converted/$line" ]]; then
VerboseOutput "Info" "Converted $line" lame -b 192 $source/$line /tmp/converted/$line 1>/dev/null 2>/dev/null
VerboseOutput "Info" "Converted $line"
else
VerboseOutput "Warning" "$line already converted"
fi;
done < "/tmp/music-sync-filelist" done < "/tmp/music-sync-filelist"
} }
@ -155,6 +160,9 @@ if [[ $help == true ]]; then
Usage Usage
exit exit
fi fi
if [[ -f /tmp/music-sync-filelist ]]; then
rm /tmp/music-sync-filelist
fi
CreateFileList $source $dest "" CreateFileList $source $dest ""
if [[ ! -f /tmp/music-sync-filelist ]]; then if [[ ! -f /tmp/music-sync-filelist ]]; then
VerboseOutput "Info" "Nothing to do!" VerboseOutput "Info" "Nothing to do!"