releaseAutomation/wikify_bom_fcl_changes.pl
author William Roberts <williamr@symbian.org>
Mon, 01 Feb 2010 12:04:35 +0000
changeset 139 7b2d146ef884
parent 123 d851824a1039
child 193 b20cc3d58393
permissions -rw-r--r--
version 0.3 - add command line processing, --dryrun option, --nosrc option Make sure that outstanding unzip commands are completed before unpacking "patch" files Refactor the unzipping, to implement dryrun and give scope for throttling the number of unzips in progress
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
123
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     1
#!/usr/bin/perl
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     2
# Copyright (c) 2009 Symbian Foundation Ltd
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     7
#
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     8
# Initial Contributors:
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
     9
# Symbian Foundation Ltd - initial contribution.
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    10
# 
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    11
# Contributors:
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    12
#
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    13
# Description:
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    14
# A quick and dirty perl script to take the generated 'changes.txt' from the BOM and wikify the FCL changes.
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    15
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    16
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    17
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    18
use strict;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    19
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    20
my $file = shift @ARGV;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    21
open(FILE, "<$file") or die "Coudln't open $file\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    22
my $fcl = undef;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    23
my $changeset = undef;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    24
my $user = undef;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    25
while(my $line = <FILE>)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    26
{
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    27
  if($line =~ m/(\S+)(\/FCL\/\S+)/i)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    28
  {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    29
    my $codeline = $1;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    30
    my $location = $2;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    31
    my $root;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    32
    if ($codeline =~ m/oss/i)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    33
    {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    34
      $root = "http://developer.symbian.org/oss" 
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    35
    }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    36
    elsif($codeline =~ m/sfl/i)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    37
    {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    38
      $root = "https://developer.symbian.org/sfl" 
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    39
    }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    40
    if (defined $fcl)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    41
    {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    42
      print "|}\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    43
    }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    44
    $fcl = $root.$location;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    45
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    46
    my @bits = split ("\/",$location);
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    47
    my $packagename = pop @bits;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    48
    $line = <FILE>; #grab next line 'cos it has the write location
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    49
    $line =~ s/\n//;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    50
    $line =~ s/\///; #just the first one...
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    51
    
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    52
    print "==== ".$packagename." ([".$fcl." ".$line."]) ====\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    53
    print "{|\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    54
  }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    55
  elsif($line =~ m/(\S+)(\/MCL\/\S+)/i)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    56
  {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    57
    if (defined $fcl)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    58
    {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    59
      print "|}\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    60
    }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    61
    undef $fcl;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    62
  }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    63
  elsif($line =~ m/^changeset:\s+\S+:(\S+)/)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    64
  {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    65
    #changeset:   118:c5817fd289ec
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    66
    $changeset = $1;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    67
  }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    68
  elsif($line =~ m/^user:\s+(\S.+)$/)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    69
  {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    70
    #changeset:   118:c5817fd289ec
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    71
    $user = $1;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    72
  }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    73
  elsif( defined $fcl)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    74
  {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    75
    if($line =~ s/^summary:\s+//)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    76
    {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    77
      $line =~ s/\n//;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    78
      my $bugzilla = "http:\/\/developer.symbian.org\/bugs\/show_bug.cgi?id=";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    79
      $line =~ s/(bug\s*)(\d+)/\[$bugzilla$2 $1$2\]/gi;
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    80
      print "|[".$fcl."rev\/".$changeset." ".$changeset."]\n|".$line."\n|-\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    81
#      print "|[".$fcl."rev\/".$changeset." ".$changeset."]\n|".$user."\n|".$line."\n|-\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    82
    }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    83
    #abort: unknown revision 'PDK_3.0.c'!
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    84
    elsif($line =~ m/^abort:\sunknown\srevision/i)
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    85
    {
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    86
      print "|\'\'\'TODO New FCL - fill in manually!!!\'\'\'\n";
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    87
    }
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    88
  }    
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    89
}
d851824a1039 Added wikify_bom_fcl_changes.pl - a quick script to wikify the FCL changes in the changes.txt that is generated in the BOM dir during a platform build.
MattD <mattd@symbian.org>
parents:
diff changeset
    90
close FILE;