summaryrefslogtreecommitdiffstats
path: root/kmail/kmail-3.3-move-identities.pl
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmail-3.3-move-identities.pl')
-rw-r--r--kmail/kmail-3.3-move-identities.pl31
1 files changed, 31 insertions, 0 deletions
diff --git a/kmail/kmail-3.3-move-identities.pl b/kmail/kmail-3.3-move-identities.pl
new file mode 100644
index 000000000..835cf4ffd
--- /dev/null
+++ b/kmail/kmail-3.3-move-identities.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+# David Faure <faure@kde.org>
+# License: GPL
+
+$currentGroup = "";
+
+while (<>) {
+ next if /^$/;
+ # recognize groups:
+ if ( /^\[(.+)\]$/ ) {
+ $currentGroup = $1;
+ if ( $currentGroup =~ /^Identity/ ) {
+ print "# DELETEGROUP [$currentGroup]\n";
+ print "[$currentGroup]\n";
+ }
+ next;
+ };
+ # Move over keys from the identity groups
+ if ( $currentGroup =~ /^Identity/ ) {
+ print;
+ }
+ # Move over the key for the default identity
+ elsif ( $currentGroup eq 'General' ) {
+ ($key,$value) = split /=/;
+ chomp $value;
+ if ( $key eq 'Default Identity' ) {
+ print "[$currentGroup]\n$key=$value\n";
+ print "# DELETE [$currentGroup]$key\n";
+ }
+ }
+}