[PATCH] configure: replace $(realpath emacs) with $(cd emacs && pwd -P)

Subject: [PATCH] configure: replace $(realpath emacs) with $(cd emacs && pwd -P)

Date: Tue, 20 Oct 2020 09:57:11 +0300

To: notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: Tomi Ollila

For portability; the realpath command (e.g. from GNU coreutils)
is not so common outside Linux systems.

The "$(cd emacs && pwd -P)" replaces that realpath(1) execution
suitably in this context (using just bash(1) builtins).

Quotes ("") added for it to be better example for someone(tm) who
may look it while writing some other shell script elsewhere;
here, as $IFS characters are not (currently!) allowed in $PWD
those makes no difference...

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 40e8b255..cfa9c09b 100755
--- a/configure
+++ b/configure
@@ -1536,7 +1536,7 @@ EOF
     if [ $WITH_PYTHON_DOCS = "1" ]; then
         echo "tags.add('WITH_PYTHON')"
-    printf "rsti_dir = '%s'\n" $(realpath emacs)
+    printf "rsti_dir = '%s'\n" "$(cd emacs && pwd -P)"
 } > sphinx.config
 # Finally, after everything configured, inform the user how to continue.
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org