summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-08 08:41:53 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-08 08:41:53 -0700
commit9347f35bc28fc7857fc520bedf0cf36d8e34c2e6 (patch)
tree1ce0fe454ecf9e5150b5959f591a39442d0dce6f
parentb6cc4f55a3d21ec6f0ffb61eee313b28a561df15 (diff)
downloadtxr-9347f35bc28fc7857fc520bedf0cf36d8e34c2e6.tar.gz
txr-9347f35bc28fc7857fc520bedf0cf36d8e34c2e6.tar.bz2
txr-9347f35bc28fc7857fc520bedf0cf36d8e34c2e6.zip
configure: lndir tweaks.
* configure (lndir): Strip trailing slash from todir argument to prevent double slashes. Remove the destination in case it is a symlink to a directory.
-rwxr-xr-xconfigure3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure b/configure
index f05f2969..82f7ead6 100755
--- a/configure
+++ b/configure
@@ -590,7 +590,7 @@ printf "Checking source directory \"%s\" ..." "$top_srcdir"
lndir()
{
fromdir=$1
- todir=$2
+ todir=${2%/}
abs=${fromdir%${fromdir#/}}
find "$fromdir" \( -type f -o -type d \) | while read frompath ; do
@@ -610,6 +610,7 @@ lndir()
[ $1 = "." ] || dots="$dots../"
shift
done
+ rm -f "$todir/$topath"
ln -sf "$dots$frompath" "$todir/$topath"
fi
else