add dotfiles installer
This commit is contained in:
parent
5704fafe4d
commit
22ee295fe8
6 changed files with 33 additions and 0 deletions
17
dotfiles/deploy-dotfiles.zsh
Executable file
17
dotfiles/deploy-dotfiles.zsh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue