From 290bd0b7dfa61d3d0b88d6338c5b00b6e598c649 Mon Sep 17 00:00:00 2001 From: Thibaut HOREL Date: Mon, 10 Dec 2012 12:17:16 +0100 Subject: Improve deploy script to make it compliant to old systems --- deploy | 12 ++++++++++++ deploy.sh | 13 ------------- 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100755 deploy delete mode 100755 deploy.sh diff --git a/deploy b/deploy new file mode 100755 index 0000000..0c147af --- /dev/null +++ b/deploy @@ -0,0 +1,12 @@ +#! /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 + ln -snf $PWD/$file $DEPLOY_DIR$(dirname $file) +done + diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index a934c19..0000000 --- a/deploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /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 - -- cgit v1.2.3-70-g09d2