continue-on-stop

This commit is contained in:
Jeroen De Meerleer 2018-11-30 15:45:02 +01:00
parent 0d6f75726c
commit 62a820de5c
1 changed files with 10 additions and 2 deletions

View File

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