[PATCH 2/2] build: install notmuch-emacs-mua with absolute shebang

Tomi Ollila tomi.ollila at iki.fi
Thu Sep 13 14:29:33 PDT 2018


On Sun, Sep 09 2018, David Bremner wrote:

> Follow distro-centric rules to reduce the chance of surprising
> behaviour due to PATH changes
> ---
>  emacs/Makefile.local | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/emacs/Makefile.local b/emacs/Makefile.local
> index 1b3ef584..3ec381e3 100644
> --- a/emacs/Makefile.local
> +++ b/emacs/Makefile.local
> @@ -110,7 +110,10 @@ endif
>  	mkdir -p "$(DESTDIR)$(emacsetcdir)"
>  	install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
>  	mkdir -p "$(DESTDIR)$(prefix)/bin/"
> -	install $(emacs_mua) "$(DESTDIR)$(prefix)/bin"
> +ifeq ($(HAVE_BASH),1)
> +	sed "1s|^#!.*$$|#! $(BASH_ABSOLUTE)|" < $(emacs_mua) > $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua

1/2 is OK(*). This change is OK too -- although the trailing $$ could be
dropped -- regexps are greedy by default so .* will consume rest of
the input anyway.

Tomi

(*) we have not cared $IFS characters in user input, as there is no danger
users shooting themselves this way ;D





> +	chmod 755 $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua
> +endif
>  ifeq ($(WITH_DESKTOP),1)
>  	mkdir -p "$(DESTDIR)$(desktop_dir)"
>  	desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" $(emacs_mua_desktop)
> -- 
> 2.18.0
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list