#! /bin/sh DEPLOY_DIR=$HOME/ #don't forget the trailing slash cd ${0%/*} find -type d ! \( -type d -path "*.git" -prune \) -print0 | xargs -0 -I '{}' mkdir -p $DEPLOY_DIR{} 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${file%/*} done