summaryrefslogtreecommitdiffstats
path: root/konversation/src/konversation-0.19-custombrowser.pl
blob: f63d0f2c5758e7a175fc2f2cb106364b405970d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/perl

use strict;

my $currentGroup = "";
my $key;
my $value;

while (<>)
{
    chomp;
    if ( /^\[/ )
    {
        $currentGroup = $_;
        next;
    }
    ($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/);
    if ($_ =~ /UseKdeDefault/)
    {
        print("# DELETE $currentGroup$key\n");
        if ($value eq "false")
        {
            print("UseCustomBrowser=true\n");
        }
    }
}