summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2012-12-10 01:23:59 +0100
committerThibaut Horel <thibaut.horel@gmail.com>2012-12-10 01:23:59 +0100
commit71440744838ee1783309fc57269c88e24a4e0926 (patch)
tree87ab9ad92389b6aba19a60a3ea8e8a602b6f46c4
downloaddotfiles-71440744838ee1783309fc57269c88e24a4e0926.tar.gz
Initial commit
-rw-r--r--README2
-rwxr-xr-xdeploy.sh13
2 files changed, 15 insertions, 0 deletions
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
+