diff options
| -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 + |
