summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2010-08-11 13:36:38 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2010-08-11 13:36:38 +0300
commit7ba34a926137ee23e8a0df3bcbe4d1a600c8d4b4 (patch)
treedc5e0ed27760277863e2b2faddfd88af5b3ec91e
parent6e97d9946c111260f88a8b23d4a0db44c928b5ed (diff)
setup: make it safer to run again
-rwxr-xr-xsetup25
1 files 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