mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
Make notmuch-mutt script more portable
The -D flag to install (used in the Makefile) is GNU-specific and does not work on BSD distributions (i.e. macOS). Likewise with the xargs -r flag. These changes use portable alternatives to these flags while preserving the exact behavior.
This commit is contained in:
parent
ea16b5ba85
commit
1fcf068e33
2 changed files with 4 additions and 4 deletions
|
@ -15,11 +15,11 @@ README.html: README
|
||||||
markdown $< > $@
|
markdown $< > $@
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p $(DESTDIR)$(prefix)/bin
|
mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(sysconfdir)/Muttrc.d
|
||||||
sed "1s|^#!.*|#! $(PERL_ABSOLUTE)|" < $(NAME) > $(DESTDIR)$(prefix)/bin/$(NAME)
|
sed "1s|^#!.*|#! $(PERL_ABSOLUTE)|" < $(NAME) > $(DESTDIR)$(prefix)/bin/$(NAME)
|
||||||
chmod 755 $(DESTDIR)$(prefix)/bin/$(NAME)
|
chmod 755 $(DESTDIR)$(prefix)/bin/$(NAME)
|
||||||
install -D -m 644 $(NAME).1 $(DESTDIR)$(mandir)/man1/$(NAME).1
|
install -m 644 $(NAME).1 $(DESTDIR)$(mandir)/man1/
|
||||||
install -D -m 644 $(NAME).rc $(DESTDIR)$(sysconfdir)/Muttrc.d/$(NAME).rc
|
install -m 644 $(NAME).rc $(DESTDIR)$(sysconfdir)/Muttrc.d/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f notmuch-mutt.1 README.html
|
rm -f notmuch-mutt.1 README.html
|
||||||
|
|
|
@ -50,7 +50,7 @@ sub search($$$) {
|
||||||
empty_maildir($maildir);
|
empty_maildir($maildir);
|
||||||
system("notmuch search --output=files $dup_option $query"
|
system("notmuch search --output=files $dup_option $query"
|
||||||
. " | sed -e 's: :\\\\ :g'"
|
. " | sed -e 's: :\\\\ :g'"
|
||||||
. " | xargs -r -I searchoutput ln -s searchoutput $maildir/cur/");
|
. " | while IFS= read -r searchoutput; do ln -s \$searchoutput $maildir/cur/; done");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub prompt($$) {
|
sub prompt($$) {
|
||||||
|
|
Loading…
Reference in a new issue