diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2012-12-10 01:23:59 +0100 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2012-12-10 01:23:59 +0100 |
| commit | 71440744838ee1783309fc57269c88e24a4e0926 (patch) | |
| tree | 87ab9ad92389b6aba19a60a3ea8e8a602b6f46c4 | |
| download | dotfiles-71440744838ee1783309fc57269c88e24a4e0926.tar.gz | |
Initial commit
| -rw-r--r-- | README | 2 | ||||
| -rwxr-xr-x | deploy.sh | 13 |
2 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,2 @@ +Run ./deploy.sh to deploy dotfiles to the home dir. +Change the first line deploy.sh to deploy to another dir. diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..43f84a3 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,13 @@ +#! /bin/sh +DEPLOY_DIR=../test2/ #don't forget the trailing slash +OIFS="$IFS" +IFS=$'\n' + +cd $(dirname $0) +find -type d ! \( -path "*.git" -prune \) -print0 | xargs -0 -I '{}' mkdir -p $DEPLOY_DIR{} +for file in $(find ! \( -path "*.git" -prune \) -type f ! -path "./deploy.sh" ! -path "./README") +do + rm -f $DEPLOY_DIR$file + ln -s -r $file $DEPLOY_DIR$(dirname $file) +done + |
