From 455efa2d5a4ecdb88b11092b2f176acf1a57ff33 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 18 Oct 2019 01:06:40 +0000 Subject: build system: configure: support shells with function-specific $0. --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8ec6f09..c7fe370 100755 --- a/configure +++ b/configure @@ -4,6 +4,10 @@ set -eu trap config_failure 1 2 EXIT +# before we begin... +mb_script="$0" +mb_path="$PATH" + usage() { cat "$mb_project_dir"/config.usage @@ -44,7 +48,7 @@ warning_msg() init_vars() { - mb_project_dir=$(cd "$(dirname $0)" ; pwd) + mb_project_dir=$(cd "$(dirname "$mb_script")" ; pwd) mb_pwd=$(pwd) mb_custom_cfgdefs_args='' -- cgit v1.2.3