summaryrefslogtreecommitdiff
path: root/autoconf/makedefault.sh
blob: e8b15360719ee2e35f24a78da846f705626454b0 (plain)
1
2
3
4
5
6
7
8
9
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"personal.muttrc -e "^source .*accounts.*" >/dev/null && \
	sed -i "s/^source .*accounts.*/source ${muttdirsed}accounts\/$title.muttrc/g" "$muttdir"personal.muttrc