From 74bc3ad0b2f4679ba0007cd372f3ab29df208388 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 11 Mar 2013 21:08:18 -0400 Subject: Generate aliases to msmtp -a * for broken emacs --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 539356e..221e5d3 100755 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ all: clean build # build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES. BUILD = $(patsubst %,build/%,$(GLOBAL_FILES) $(LOCAL_FILES) $(GPG_FILES)) -build: $(BUILD) emacsen +build: $(BUILD) emacsen build/bin/msmtp/msmtp-default # We must force these with a phony target, otherwise, make will see that they're # already there (for example, from installing the rest of .mutt or .zsh) and @@ -135,6 +135,11 @@ emacsen: [ "$(EMACS_DISABLED)" = "True" ] || $(MAKE) -C $@ [ "$(EMACS_DISABLED)" = "True" ] || $(MAKE) -C $@ install +build/bin/msmtp/msmtp-default: build/.msmtprc + -mkdir -p $(dir $@) + awk '/account/ { print "#!/bin/sh" > "$(dir $@)/msmtp-"$$2 ; print "$(call get-val,MSMTP_PATH) -a " $$2 " \"$$@\"" >> "$(dir $@)/msmtp-"$$2 }' $< + chmod 755 build/bin/msmtp/* + build/%: % $(SUBSTS_FILE) [ -d $(dir $@) ] || mkdir -p $(dir $@) ( [ -d $< ] && rsync -a $