summaryrefslogtreecommitdiffstats
path: root/cervisia/move_repositories.pl
blob: c38b352d7ede721cfb1732a369289c389b7aadab (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/perl

$DEBUG = 0;

while(<>)
{
    if( /\[(Repository-.*)\]/ )
    {
        # remember group section
        $section = $1;
        print "[$section]\n";
        next;
    }
    if( /\[(.*)\]/ )
    {
        # clear section variable for other groups
        $section = "";
        next;
    }
    if( /^Compression=(.*)$/ )
    {
        # skip if not in repository group
        if( $section eq "" )
        {
            next;
        }

        print STDERR "\n[$section]Compression=$1\n" if ( $DEBUG );
        print "Compression=$1\n";
    }
    if( /^rsh=(.*)$/ )
    {
        # skip if not in repository group
        if( $section eq "" )
        {
            next;
        }

        print STDERR "\n[$section]rsh=$1\n" if ( $DEBUG );
        print "rsh=$1\n";
    }
}