[PATCH] configure: resolve real path to bash

Danh Doan congdanhqx at gmail.com
Wed Jan 30 13:06:18 PST 2019

David Bremner <david at tethera.net> writes:

> Đoàn Trần Công Danh <congdanhqx at gmail.com> writes:
>> The old code somehow resolves to `bin/sh' on Arch Linux/Void Linux
>> auto build systems.
> I'm not sure if this is better or worse than
>     https://nmbug.notmuchmail.org/nmweb/show/20190117021132.28327-1-david%40tethera.net

Sorry for the noise, I somehow couldn't find your patch at that time.
And I only recognized readlink(1) is not POSIX after sending the patch.

I wonder if it's better to keep `/usr/bin/env bash` instead of resolving
bash to specific file. Something like this:

diff --git a/emacs/Makefile.local b/emacs/Makefile.local
index 04913a06..2252e818 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -117,7 +117,6 @@ endif
 	install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
 	mkdir -p "$(DESTDIR)$(prefix)/bin/"
 ifeq ($(HAVE_BASH),1)
-	sed "1s|^#!.*|#! $(BASH_ABSOLUTE)|" < $(emacs_mua) > $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua
 	chmod 755 $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua
 ifeq ($(WITH_DESKTOP),1)

> I welcome input on this.
> One issue is that readlink(1) is not in POSIX, so we can expect some
> portability pains.
> d


More information about the notmuch mailing list