Compare commits

..

No commits in common. "c6deac7e029baaad493e4d4b51b04654baad4f83" and "800525d90b5406bb0e2cec5bb4e1efdd0af2f76f" have entirely different histories.

2 changed files with 26 additions and 29 deletions

View File

@ -1,36 +1,33 @@
#!/bin/bash
copyFiles_matching() {
local extension="${filename##*.}"
if \
extension="${filename##*.}"
cp -al \
"$sourcepath/$filename" \
"${destinationpath[$destination]}/$destdir/$destfile.$extension" \
"$destdir/$destfile.$extension" \
2>/dev/null \
|| cp -a \
"$sourcepath/$filename" \
"${destinationpath[$destination]}/$destdir/$destfile.$extension"
then
echo \
"UPDATE destination_files" \
"SET filename=" \
"\"${destdir//\"/\"\"}/${destfile//\"/\"\"}.$extension\"," \
" last_change=(" \
" SELECT last_change" \
" FROM source_files" \
" WHERE id=$fileid" \
" )," \
" old_filename=(" \
" SELECT filename" \
" FROM destination_files" \
" WHERE id=$destfileid" \
" )," \
" rename_pattern=" \
"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}\","\
" fat32compat=" \
"${destinationfat32compat["$destination"]}," \
" ascii=${destinationascii["$destination"]}"\
"WHERE id=$destfileid;" \
>&3
(( ++copies ))
fi
"$destdir/$destfile.$extension"
echo \
"UPDATE destination_files" \
"SET filename=" \
"\"${destdir//\"/\"\"}/${destfile//\"/\"\"}.$extension\"," \
" last_change=(" \
" SELECT last_change" \
" FROM source_files" \
" WHERE id=$fileid" \
" )," \
" old_filename=(" \
" SELECT filename" \
" FROM destination_files" \
" WHERE id=$destfileid" \
" )," \
" rename_pattern=" \
"\"${destinationrenamepath[$destination]}/${destinationrename[$destination]}\","\
" fat32compat=" \
"${destinationfat32compat["$destination"]}," \
" ascii=${destinationascii["$destination"]}" \
"WHERE id=$destfileid;" \
>&3
(( ++copies ))
}

View File

@ -98,7 +98,7 @@ getDestDir() {
part=${part#*/}
done
fi
if ! [ -d "${destinationpath[$destination]}/$destdir" ]
if ! [ -d "$destdir" ]
then
mkdir -p "${destinationpath[$destination]}/$destdir"
fi