diff options
Diffstat (limited to 'kopete/kopete/kconf_update/kopete-account-0.10.pl')
-rwxr-xr-x | kopete/kopete/kconf_update/kopete-account-0.10.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kopete/kopete/kconf_update/kopete-account-0.10.pl b/kopete/kopete/kconf_update/kopete-account-0.10.pl new file mode 100755 index 00000000..3925a52f --- /dev/null +++ b/kopete/kopete/kconf_update/kopete-account-0.10.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w +# Olivier Goffart <ogoffart @ tiscalinet.be> +# License: GPL + +use strict; + +# This script rename old plugin datas key. +# It remove the PlguinData_PLUGINID_ prefix from keys. + +# read the whole config file +my $currentGroup = ""; +my %configFile; +while ( <> ) { + chomp; # eat the trailing '\n' + next if ( /^$/ ); # skip empty lines + next if ( /^\#/ ); # skip comments + if ( /^\[/ ) { # group begin + $currentGroup = $_; + next; + } elsif ( $currentGroup =~ /^\[Account_/ and /^PluginData\_.+_(.+)=(.+)$/ ) + { + print "$currentGroup\n$1=$2\n"; + my ($key,$value) = split /=/; + print "# DELETE $currentGroup$key\n"; + } +} |