From badf508538e060289189e497cd20d4f1000533f3 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 10 Feb 2018 16:00:14 -0700 Subject: mutt configuration now automatic --- makedefault.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 makedefault.sh (limited to 'makedefault.sh') diff --git a/makedefault.sh b/makedefault.sh new file mode 100644 index 0000000..c21a241 --- /dev/null +++ b/makedefault.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Give this script the abstract name of an account and it will make it the default. + +title=$1 +muttdir="$HOME/.config/mutt/" +muttdirsed=$(echo $muttdir | sed -e 's/\//\\\//g') + +grep "$muttdir"muttrc -e "^source .*accounts.*" >/dev/null && \ + sed -i "s/^source .*accounts.*/source ${muttdirsed}accounts\/$title.muttrc/g" "$muttdir"muttrc -- cgit v1.2.3