From 71440744838ee1783309fc57269c88e24a4e0926 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Mon, 10 Dec 2012 01:23:59 +0100 Subject: Initial commit --- README | 2 ++ deploy.sh | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 README create mode 100755 deploy.sh diff --git a/README b/README new file mode 100644 index 0000000..1a8b284 --- /dev/null +++ b/README @@ -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 + -- cgit v1.2.3-70-g09d2