summaryrefslogtreecommitdiff
path: root/makedefault.sh
diff options
context:
space:
mode:
authorLuke <luke@lukesmith.xyz>2018-02-10 16:00:14 -0700
committerLuke <luke@lukesmith.xyz>2018-02-10 16:00:14 -0700
commitbadf508538e060289189e497cd20d4f1000533f3 (patch)
treeda76291de29bcf23bb31fa2d56351df9937818cb /makedefault.sh
parentcf773b4db50101dbdb568a171f270d470f4e5e62 (diff)
mutt configuration now automatic
Diffstat (limited to 'makedefault.sh')
-rw-r--r--makedefault.sh10
1 files changed, 10 insertions, 0 deletions
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