mutt-wizard/makedefault.sh
2018-02-10 16:00:14 -07:00

11 lines
349 B
Bash

#!/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