aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-06-07 10:33:22 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-06-07 10:33:22 +0100
commit4fa84d0faa5505f53bc24b75628ab883b35ad299 (patch)
treed4c8bd0de6514bd6478bf614527b38e676960559
parentcd42db616993bd40525f30b6e405d8b5bce2f1db (diff)
Don't add symlink if it is to the same place.
This applies in e.g. a Vagrant installation.
-rwxr-xr-xbin/install-as-user4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/install-as-user b/bin/install-as-user
index 99eca0b82..502cf0e3e 100755
--- a/bin/install-as-user
+++ b/bin/install-as-user
@@ -53,7 +53,9 @@ fi
REPOSITORY="$DIRECTORY/fixmystreet"
LINK_DESTINATION="$HOME/fixmystreet"
-ln -sfn "$REPOSITORY" $LINK_DESTINATION
+if [ "$REPOSITORY" != "$LINK_DESTINATION" ]; then
+ ln -sfn "$REPOSITORY" $LINK_DESTINATION
+fi
cd "$REPOSITORY"
if [ ! "$DEVELOPMENT_INSTALL" = true ]; then