17 lines
242 B
Bash
Executable file
17 lines
242 B
Bash
Executable file
#! /bin/zsh
|
|
|
|
SRCDIR="$1"
|
|
DESTDIR="$2"
|
|
|
|
pushd "${SRCDIR}"
|
|
find . -type d | while read P
|
|
do
|
|
echo mkdir -p "${DESTDIR}/${P[3,-1]}"
|
|
done
|
|
|
|
find . -type f | while read P
|
|
do
|
|
P="${P[3,-1]}"
|
|
echo cp -bv "${P}" "${DESTDIR}/${P}"
|
|
done
|
|
popd
|