diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-08-11 13:36:38 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-08-11 13:36:38 +0300 |
commit | 7ba34a926137ee23e8a0df3bcbe4d1a600c8d4b4 (patch) | |
tree | dc5e0ed27760277863e2b2faddfd88af5b3ec91e | |
parent | 6e97d9946c111260f88a8b23d4a0db44c928b5ed (diff) |
setup: make it safer to run again
-rwxr-xr-x | setup | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -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 |