[PATCH] configure: replace multiple redirects with redirected block

Subject: [PATCH] configure: replace multiple redirects with redirected block

Date: Wed, 15 Jul 2020 09:36:27 -0300

To: David Bremner, Tomi Ollila, notmuch@notmuchmail.org

Cc: flub@devork.be

From: David Bremner


This belatedly implements Tomi's suggestion from

     id:m25zaukv6u.fsf@guru.guru-group.fi
---
 configure | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index b4ee7f37..d3b843b9 100755
--- a/configure
+++ b/configure
@@ -1549,16 +1549,16 @@ NOTMUCH_HAVE_PYTHON3_PYTEST=${have_python3_pytest}
 PLATFORM=${platform}
 EOF
 
-cat > sphinx.config <<EOF
-# Generated by configure, run from doc/conf.py
-EOF
-if [ $WITH_EMACS = "1" ]; then
-    printf "tags.add('WITH_EMACS')\n" >> sphinx.config
-fi
-if [ $WITH_PYTHON_DOCS = "1" ]; then
-    printf "tags.add('WITH_PYTHON')\n" >> sphinx.config
-fi
-printf "rsti_dir = '%s'\n" $(realpath emacs) >> sphinx.config
+{
+    echo "# Generated by configure, run from doc/conf.py"
+    if [ $WITH_EMACS = "1" ]; then
+        echo "tags.add('WITH_EMACS')"
+    fi
+    if [ $WITH_PYTHON_DOCS = "1" ]; then
+        echo "tags.add('WITH_PYTHON')"
+    fi
+    printf "rsti_dir = '%s'\n" $(realpath emacs)
+} > sphinx.config
 
 # Finally, after everything configured, inform the user how to continue.
 cat <<EOF
-- 
2.27.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: