summaryrefslogtreecommitdiffstats
path: root/configure
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
commit973521df42d9602bedd487d7b137d8698916a1d9 (patch)
tree1ce0fe454ecf9e5150b5959f591a39442d0dce6f /configure
parent10486e76d527cf53786664ecee164d0398b029c9 (diff)
downloadtxr-973521df42d9602bedd487d7b137d8698916a1d9.tar.gz
txr-973521df42d9602bedd487d7b137d8698916a1d9.tar.bz2
txr-973521df42d9602bedd487d7b137d8698916a1d9.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.
Diffstat (limited to 'configure')
-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