From ede095ce97e7f7ba532edb5359b9d13a21e2bcc4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 10 Nov 2022 00:41:13 +1300 Subject: Set shebang for muttrc.d/src at build time --- .gitignore | 1 + Makefile | 3 ++- mutt/muttrc.d/src | 26 -------------------------- mutt/muttrc.d/src.sh | 24 ++++++++++++++++++++++++ 4 files changed, 27 insertions(+), 27 deletions(-) delete mode 100755 mutt/muttrc.d/src create mode 100644 mutt/muttrc.d/src.sh diff --git a/.gitignore b/.gitignore index 107c89da..f6e5bd55 100644 --- a/.gitignore +++ b/.gitignore @@ -186,6 +186,7 @@ /include/mktd.m4 /less/less /mutt/filters/markdown-to-html +/mutt/muttrc.d/src /tmux/bin/tmux /urxvt/ext/select /x/xsession diff --git a/Makefile b/Makefile index 7743d696..1e03d000 100644 --- a/Makefile +++ b/Makefile @@ -302,6 +302,7 @@ clean distclean: include/mktd.m4 \ less/less \ mutt/filters/markdown-to-html \ + mutt/muttrc.d/src \ tmux/bin/tmux \ urxvt/ext/select \ x/xsession @@ -494,7 +495,7 @@ install-mpv: $(XDG_DATA_HOME)/mpv/screenshots cp -p -- mpv/mpv.conf $(XDG_CONFIG_HOME)/mpv -install-mutt: install-gnupg install-mail mutt/filters/markdown-to-html +install-mutt: install-gnupg install-mail mutt/filters/markdown-to-html mutt/muttrc.d/src mkdir -p -- \ $(XDG_CONFIG_HOME)/mutt \ $(XDG_CONFIG_HOME)/mutt/muttrc.d \ diff --git a/mutt/muttrc.d/src b/mutt/muttrc.d/src deleted file mode 100755 index 47cb2df1..00000000 --- a/mutt/muttrc.d/src +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Build groups from address lists -for rc in "$HOME"/.config/mutt/muttrc.d/groups/*.list ; do - [ -e "$rc" ] || continue - group=$rc - group=${group##*/} - group=${group%.list} - while read -r member ; do - printf 'group -group %s -addr %s\n' \ - "$group" "$member" - done < "$rc" -done - -# Emit the source all muttrc subfiles, in LC_COLLATE order -for rc in "$HOME"/.config/mutt/muttrc.d/*.rc ; do - [ -e "$rc" ] || continue - cat -- "$rc" -done - -# Special case: if using GNU Emacs, emit a line to disable edit_headers, just -# because at the moment I haven't worked out how to make this work sanely with -# messages-are-flowing in message-mode. -case $VISUAL in - emacs|emacsclient) printf 'unset edit_headers\n' ;; -esac diff --git a/mutt/muttrc.d/src.sh b/mutt/muttrc.d/src.sh new file mode 100644 index 00000000..60e0c566 --- /dev/null +++ b/mutt/muttrc.d/src.sh @@ -0,0 +1,24 @@ +# Build groups from address lists +for rc in "$HOME"/.config/mutt/muttrc.d/groups/*.list ; do + [ -e "$rc" ] || continue + group=$rc + group=${group##*/} + group=${group%.list} + while read -r member ; do + printf 'group -group %s -addr %s\n' \ + "$group" "$member" + done < "$rc" +done + +# Emit the source all muttrc subfiles, in LC_COLLATE order +for rc in "$HOME"/.config/mutt/muttrc.d/*.rc ; do + [ -e "$rc" ] || continue + cat -- "$rc" +done + +# Special case: if using GNU Emacs, emit a line to disable edit_headers, just +# because at the moment I haven't worked out how to make this work sanely with +# messages-are-flowing in message-mode. +case $VISUAL in + emacs|emacsclient) printf 'unset edit_headers\n' ;; +esac -- cgit v1.2.3