From 34501199f36d133ffa6f9b7fe02b19a127c03060 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 22 Apr 2019 14:21:40 -0400 Subject: mailcap and mwrc global --- bin/mw | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/mw b/bin/mw index c058e73..70a1d31 100755 --- a/bin/mw +++ b/bin/mw @@ -9,7 +9,7 @@ emailre=".\+@.\+\\..\+" # Regex to confirm valid email address muttshare="/usr/share/mutt-wizard" mbsyncrc="$HOME/.mbsyncrc" sslcert="/etc/ssl/certs/ca-certificates.crt" -mwconfig="$muttdir/mutt-wizard.muttrc" +mwconfig="/usr/share/mutt-wizard/mutt-wizard.muttrc" muttrc="$muttdir/muttrc" getaccounts() { accounts="$(find "$accdir" -type f | grep -o "[0-9]-.*.muttrc" | sed "s/-/: /g;s/\..*//" | sort -n)" ;} @@ -260,13 +260,11 @@ asktype() { while : ; do init() { mkdir -p "$muttdir" "$accdir" [ ! -f "$muttrc" ] && echo "# vim: filetype=neomuttrc" > "$muttrc" && echo "muttrc created." - cp -f "$muttshare/mailcap" "$muttdir" && echo "Mailcap file added." - cp -f "$muttshare/mutt-wizard.muttrc" "$muttdir" && echo "mutt-wizard config file added." ! grep "^source.*mutt-wizard.muttrc" "$muttrc" >/dev/null && echo "source $mwconfig # mw-autogenerated" >> "$muttrc" && echo "muttrc will now source mutt-wizard." } purge() { confirm "delete all account data" || exit - rm -rf "$mbsyncrc" "$accdir" "$mwconfig" "$HOME/.config/msmtp" "$mwconfig" + rm -rf "$mbsyncrc" "$accdir" "$HOME/.config/msmtp" echo "All configs and account settings have been purged." sed -i "/\# mw-autogenerated/d" "$muttrc" } -- cgit v1.2.3