Added CopyFiles

This commit is contained in:
Jeroen De Meerleer 2018-11-30 13:41:26 +01:00
parent 79d8e62d20
commit 0e0b52cb3e

View File

@ -127,10 +127,22 @@ ConvertFiles() {
done < "/tmp/music-sync-filelist" done < "/tmp/music-sync-filelist"
} }
CopyFiles() {
while read -r line
do
VerboseOutput "Info" "Copy $line"
if [[ "$dest/$line" = */* ]]; then
mkdir -p "$dest/${line%/*}";
fi;
cp -f $source/$line $dest/$line # 1>/dev/null 2>/dev/null
done < "/tmp/music-sync-filelist"
}
GetOptions $@ GetOptions $@
if [[ "$help" == true ]]; then if [[ "$help" == true ]]; then
Usage Usage
exit exit
fi fi
CreateFileList $source $dest "" CreateFileList $source $dest ""
ConvertFiles ConvertFiles
CopyFiles