add dotfiles installer

This commit is contained in:
Martinez 2015-12-30 13:10:35 +01:00
parent 5704fafe4d
commit 22ee295fe8
6 changed files with 33 additions and 0 deletions

17
dotfiles/deploy-dotfiles.zsh Executable file
View file

@ -0,0 +1,17 @@
#! /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