mutt-wizard/autoconf/makedefault.sh

11 lines
367 B
Bash
Raw Normal View History

2018-02-11 00:00:14 +01:00
#!/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')
2018-02-12 00:55:19 +01:00
grep "$muttdir"personal.muttrc -e "^source .*accounts.*" >/dev/null && \
sed -i "s/^source .*accounts.*/source ${muttdirsed}accounts\/$title.muttrc/g" "$muttdir"personal.muttrc