Commit e4042c25 authored by unknown's avatar unknown

mysql-copyright:

  * added 'local $/' to keep from undef-ing $/ (the newline setting) for the whole script
  * removed the target dir removal (target dir is not a temp dir!)
  * use split to create filelist (cleaner way than using chomp!)
  * removed use of chomp because it caused some file names to be mangled
  * print out which file is being processed if verbose
mysql-copyright-2:
  * added cpp to list of files to be processed (for windows archives)


Build-tools/mysql-copyright-2:
  * added cpp to list of files to be processed (for windows archives)
Build-tools/mysql-copyright:
  * added 'local $/' to keep from undef-ing $/ (the newline setting) for the whole script
  * removed the target dir removal (target dir is not a temp dir!)
  * use split to create filelist (cleaner way than using chomp!)
  * removed use of chomp because it caused some file names to be mangled
  * print out which file is being processed if verbose
parent 518c9236
......@@ -79,7 +79,7 @@ sub main
$newdistname .= $suffix if $win_flag;
}
# find out the extract path (should be same as distname!)
chomp($destdir= `tar ztf ../$distfile | head -1`);
chomp($destdir = `tar ztf ../$distfile | head -1`);
# remove slash from the end
$destdir= substr($destdir, 0, -1);
......@@ -111,6 +111,7 @@ sub main
chdir("$destdir");
unlink ("configure") or die "Can't delete $destdir/configure: $!\n";
open(CONFIGURE,"<configure.in") or die "$! Unable to open configure.in to read from!\n";
local $/;
undef $/;
my $configure = <CONFIGURE>;
close(CONFIGURE);
......@@ -150,13 +151,6 @@ sub main
print "$! Unable to delete $dir!\n";
}
}
if (-e $opt_target) {
print "Trying to delete $opt_target\n" if $opt_verbose;
if ( system("rm -rf $opt_target")) {
print "$! Unable to delete $opt_target!\n";
}
}
}
exit(0);
}
......@@ -165,14 +159,17 @@ sub main
#### mysqld and MySQL client programs have a usage printed with --help.
#### This usage includes a copyright, which needs to be modified
####
sub fix_usage_copyright
{
my @Cfiles = `find . -type f -name \"*.c*\"`;
foreach my $Cfile (@Cfiles)
my $findlist = `find . -type f -name \"*.c*\"`;
my @files = split("\n", $findlist);
my $cwd = getcwd();
foreach my $file (@files)
{
chop $Cfile;
`replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- "$Cfile"` if -f $Cfile;
next if ! -f $file;
print "processing file $file in cwd $cwd\n" if $opt_verbose;
`replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- "$file"` ;
}
}
......@@ -182,12 +179,14 @@ sub fix_usage_copyright
sub add_copyright
{
my @files = `find . -type f -name "*"`;
my $findlist = `find . -type f -name "*"`;
my @files = split("\n", $findlist);
my $cwd = getcwd();
foreach my $file (@files)
{
chop $file;
next if ! -f $file;
next if -B $file;
print "processing file $file in cwd $cwd\n" if $opt_verbose;
`$WD/Build-tools/mysql-copyright-2 "$file"`;
}
}
......
......@@ -89,6 +89,7 @@ sub add_copyright
elsif ($ARGV =~ /\.c$/ ||
$ARGV =~ /\.cc$/ ||
$ARGV =~ /\.h$/ ||
$ARGV =~ /\.cpp$/ ||
$ARGV =~ /\.yy$/)
{
$start_copyright="/* ";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment