taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <a...@apache.org>
Subject Re: No apache License headers in taverna-workbench module
Date Wed, 07 Sep 2016 13:08:22 GMT


On 07/09/16 12:04, Stian Soiland-Reyes wrote:
> It should - if the script or maven plugin is able to cleanly remove
> the old header.

I use perl:

undef $/ ;
s!/.*?\npackage!\npackage!s ;

i.e. remove everything up until the "package" on the start of a line.

This avoids having to match different layouts.

	Andy

#!/usr/bin/perl
# find . -name \*.java | xargs -n 1 perl -i.bak SCRIPT

undef $/ ;

$_ = <> ;

# Remove initial comments.

s!/.*?\npackage!\npackage!s ;

# print LICENSE

$HEADER=<<'EOF';
/*
     Your license goes here.
  */
EOF

print $HEADER ;
print $_ ;

Mime
View raw message