reordering

This commit is contained in:
Luke 2018-02-20 22:33:26 -07:00
parent aa1bdbb7d6
commit 4b186c6370

View File

@ -149,6 +149,9 @@ addAccount() {
shred -u /tmp/$title shred -u /tmp/$title
mv /tmp/$title.gpg ~/.config/mutt/credentials/ mv /tmp/$title.gpg ~/.config/mutt/credentials/
# Adding directory structure for cache.
mkdir -p "$muttdir"accounts/$title/cache/bodies
# Creating the offlineimaprc if it doesn't exist already. # Creating the offlineimaprc if it doesn't exist already.
if [ ! -f ~/.offlineimaprc ]; then cp "$muttdir"autoconf/offlineimap_header ~/.offlineimaprc; fi if [ ! -f ~/.offlineimaprc ]; then cp "$muttdir"autoconf/offlineimap_header ~/.offlineimaprc; fi
cat "$muttdir"autoconf/offlineimap_profile | sed -e "$replacement" >> ~/.offlineimaprc cat "$muttdir"autoconf/offlineimap_profile | sed -e "$replacement" >> ~/.offlineimaprc
@ -159,9 +162,6 @@ addAccount() {
# Add a numbered shortcut in the muttrc # Add a numbered shortcut in the muttrc
echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source "$muttdir"accounts/$title.muttrc<enter><change-folder>!<enter>'" >> "$muttdir"personal.muttrc echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source "$muttdir"accounts/$title.muttrc<enter><change-folder>!<enter>'" >> "$muttdir"personal.muttrc
# Adding directory structure for cache.
mkdir -p "$muttdir"accounts/$title/cache/bodies
# Add to offlineimaprc sync list. # Add to offlineimaprc sync list.
sed -i "s/^accounts =.*[a-zA-Z]$/&, $title/g;s/^accounts =$/accounts = $title/g" ~/.offlineimaprc sed -i "s/^accounts =.*[a-zA-Z]$/&, $title/g;s/^accounts =$/accounts = $title/g" ~/.offlineimaprc