From d06e79cb18849df48e3e2b431c8b5fe6a32d3b6c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Mar 2016 13:03:45 -0500 Subject: improve configure --- configure | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index ef9a41f..5e99fa6 100755 --- a/configure +++ b/configure @@ -25,14 +25,14 @@ error() { exit 1 } -topsrcdir=$(realpath -ms --relative-to=. -- "$srcdir") -if [ "$topsrcdir" = . ]; then - topsrcdir= +if [ "${srcdir:0:1}" = / ]; then + topsrcdir=$srcdir else - topsrcdir=/$topsrcdir + topsrcdir="&/$srcdir" fi +topsrcdir="${topsrcdir%/.}" -edit=(sed -E -e "s|^topsrcdir := .*|&$topsrcdir|") +edit=(sed -E -e "s|^topsrcdir := .*|$topsrcdir|") setvar() { edit+=(-e "s@^(\s*$1\s*:?=).*@\1 $2@") } -- cgit v1.2.3-54-g00ecf