diff options
-rwxr-xr-x | configure | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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@") } |