over-env/dotfiles/deploy-dotfiles.zsh
2015-12-30 13:10:35 +01:00

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