Resolve "Store dest filename relative"
This commit is contained in:
parent
9c2ff0fafb
commit
12507b1e1a
@ -1,13 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
copyFiles_matching() {
|
copyFiles_matching() {
|
||||||
extension="${filename##*.}"
|
local extension="${filename##*.}"
|
||||||
|
if \
|
||||||
cp -al \
|
cp -al \
|
||||||
"$sourcepath/$filename" \
|
"$sourcepath/$filename" \
|
||||||
"$destdir/$destfile.$extension" \
|
"${destinationpath[$destination]}/$destdir/$destfile.$extension" \
|
||||||
2>/dev/null \
|
2>/dev/null \
|
||||||
|| cp -a \
|
|| cp -a \
|
||||||
"$sourcepath/$filename" \
|
"$sourcepath/$filename" \
|
||||||
"$destdir/$destfile.$extension"
|
"${destinationpath[$destination]}/$destdir/$destfile.$extension"
|
||||||
|
then
|
||||||
echo \
|
echo \
|
||||||
"UPDATE destination_files" \
|
"UPDATE destination_files" \
|
||||||
"SET filename=" \
|
"SET filename=" \
|
||||||
@ -30,4 +32,5 @@ copyFiles_matching() {
|
|||||||
"WHERE id=$destfileid;" \
|
"WHERE id=$destfileid;" \
|
||||||
>&3
|
>&3
|
||||||
(( ++copies ))
|
(( ++copies ))
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,7 +98,7 @@ getDestDir() {
|
|||||||
part=${part#*/}
|
part=${part#*/}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if ! [ -d "$destdir" ]
|
if ! [ -d "${destinationpath[$destination]}/$destdir" ]
|
||||||
then
|
then
|
||||||
mkdir -p "${destinationpath[$destination]}/$destdir"
|
mkdir -p "${destinationpath[$destination]}/$destdir"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user