summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy8
1 files changed, 3 insertions, 5 deletions
diff --git a/deploy b/deploy
index f6dc539..1a53e6c 100755
--- a/deploy
+++ b/deploy
@@ -1,12 +1,10 @@
#! /bin/sh
DEPLOY_DIR=$HOME/ #don't forget the trailing slash
-OIFS="$IFS"
-IFS=$'\n'
-cd $(dirname $0)
+cd ${0%/*}
find -type d ! \( -type d -path "*.git" -prune \) -print0 | xargs -0 -I '{}' mkdir -p $DEPLOY_DIR{}
-for file in $(find ! \( -type d -path "*.git" -prune \) -type f ! -path "./deploy" ! -path "./README")
+find ! \( -type d -path "*.git" -prune \) -type f ! -path "./deploy" ! -path "./README" -print0 | while IFS="" read -r -d "" file
do
- ln -snf $PWD/$file $DEPLOY_DIR$(dirname $file)
+ ln -snf $PWD/$file $DEPLOY_DIR${file%/*}
done