diff options
Diffstat (limited to 'migrationhelper')
-rwxr-xr-x | migrationhelper | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/migrationhelper b/migrationhelper new file mode 100755 index 000000000000..1965368bfd47 --- /dev/null +++ b/migrationhelper @@ -0,0 +1,56 @@ +#!/bin/sh +#shellcheck disable=SC1001 + +printf '\n\n \033[1;33mmailwizard\n ¯¯¯¯¯¯¯¯¯¯\033[31m\n' +echo 'Please execute this only if you are migrating from mutt-wizard to mailwizard.' +printf '\n\033[0;32mDo you have an active mutt-wizard configuration [y/N] ? \033[1;34m' +read -r +case x$REPLY in + x[yY]) + printf '\n\n\033[0;33m' + cat <<-E1 + The configuration files need to be patched to prevent conflicts with mailwizard. + You could either do this manually by following a four-step guide you will be + shown if you should decide to do so. + Otherwise this script can automatically do the necessary steps for you. + E1 + printf '\n\033[32mDo you want your config migrated automatically [y/N] ? \033[1;34m' + read -r + case x$REPLY in + x[yY]) + printf '\n\n\033[0m' + echo \$ mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/isync" + #mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/isync" + echo \$ mv ~/.mbsyncrc "${XDG_CONFIG_HOME:-$HOME/.config}/isync/mbsyncrc" + #mv ~/.mbsyncrc "${XDG_CONFIG_HOME:-$HOME/.config}/isync/mbsyncrc" + echo \$ sed -i~ \'s/mutt-\(wizard\)/mail\1/g\' \ + "${XDG_CONFIG_HOME:-$HOME/.config}/isync/mbsyncrc" \ + "$HOME/.config/msmtp/msmtprc" + #sed -i~ 's/mutt-\(wizard\)/mail\1/g' \ + #"${XDG_CONFIG_HOME:-$HOME/.config}/isync/mbsyncrc" \ + #"$HOME/.config/msmtp/msmtprc" + echo \$ sed -i~ \'/\# mw-autogenerated/d\' "${XDG_CONFIG_HOME:-$HOME/.config}/muttrc" + #sed -i~ '/\# mw-autogenerated/d' "${XDG_CONFIG_HOME:-$HOME/.config}/muttrc" + echo \$ rm -r "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/accounts" + #rm -r "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/accounts" + ;; + x*) + printf '\n\n\n\033[1;31m Migration Guide\n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\033[0;36m' + cat <<-E2 + • Edit "~/.mbsyncrc", change 'mutt-wizard' to 'mailwizard', and move this file + to "~/.config/isync/mbsyncrc". + + • Edit "~/.config/msmtp/msmtprc" and change 'mutt-wizard' to 'mailwizard' here + too. Leave this file at its place. + + • Edit "~/.config/mutt/muttrc" in-place, remove all lines which were generated + by mutt-wizard. + + • Remove all files inside "~/.config/mutt/accounts/". These shall be regenera- + ted 'the mailwizard way' the next time you run the "mw" command. + E2 + esac +esac +printf '\033[0m\n' + +# vim: ts=2 sw=2 noet ft=bash: |