summaryrefslogtreecommitdiffstats
path: root/deploy.sh
blob: a934c1920013a8dc4a6c0998aa7dbc9f9eec6ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /bin/sh
DEPLOY_DIR=$HOME/ #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