From 7ba34a926137ee23e8a0df3bcbe4d1a600c8d4b4 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 11 Aug 2010 13:36:38 +0300 Subject: setup: make it safer to run again --- setup | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/setup b/setup index 75924f8..ad5573d 100755 --- a/setup +++ b/setup @@ -16,15 +16,19 @@ name="$1" case "$name" in asterisk) # Use the dummy menuselect: - mkdir -p menuselect - (cd menuselect; ln -s ../$TOOLS_DIR/menuselect/* .) - make -C menuselect dummies + if [ ! -d menuselect ]; then + mkdir -p menuselect + (cd menuselect; ln -s ../$TOOLS_DIR/menuselect/* .) + make -C menuselect dummies + fi ;; dahdi-tools) # A really-dummy menuselect - mkdir menuselect - cp $TOOLS_DIR/menuselect/Makefile menuselect - ln -s /bin/true menuselect/menuselect + if [ ! -d menuselect ]; then + mkdir menuselect + cp $TOOLS_DIR/menuselect/Makefile menuselect + ln -s /bin/true menuselect/menuselect + fi ;; dahdi-linux) ln -s ../../../octapi/software drivers/dahdi/oct612x @@ -40,7 +44,10 @@ case "$name" in esac # Just in case you'll use git-svn here as well: -ln -s $TOOLS_DIR/AUTHORS . +if [ ! -r AUTHORS ]; then + ln -s $TOOLS_DIR/AUTHORS . +fi + git config --add svn.authorsfile AUTHORS # Make sure we have a proper .version file after checkout / pull @@ -50,4 +57,6 @@ for hook in post-checkout post-merge; do fi done -ln -s $TOOLS_DIR/${name}_gitignore .gitignore +if [ ! -r .gitignore ]; then + ln -s $TOOLS_DIR/${name}_gitignore .gitignore +fi -- cgit v1.2.3