Menu

[r5763]: / branches / drjava-asynctask / strip-license  Maximize  Restore  History

Download this file

23 lines (19 with data), 589 Bytes

#!/usr/bin/perl

# strip-license: Removes the specially stylized license/copyright block
# from the file given on stdin and writes out the rest to stdout. Used
# as a part of relicense.
$start_block="/*BEGIN_COPYRIGHT_BLOCK\n";
$end_block="END_COPYRIGHT_BLOCK*/\n";
$end_block2=" END_COPYRIGHT_BLOCK*/\n";

while ($line = <STDIN>) {
  if ($line eq $start_block) {
    while ($line = <STDIN>) {
      if (($line eq $end_block) || ($line eq $end_block2)) {
        # skip blank lines after end
        while (($line = <STDIN>) eq "\n") {}
        last;
      }
    }
  }

  print "$line";
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.