summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild-tools/mysql-copyright31
-rwxr-xr-xBuild-tools/mysql-copyright-21
2 files changed, 16 insertions, 16 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright
index 1906675d470..f3a2a2960ea 100755
--- a/Build-tools/mysql-copyright
+++ b/Build-tools/mysql-copyright
@@ -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"`;
}
}
diff --git a/Build-tools/mysql-copyright-2 b/Build-tools/mysql-copyright-2
index e946ed217d1..a1a870526da 100755
--- a/Build-tools/mysql-copyright-2
+++ b/Build-tools/mysql-copyright-2
@@ -89,6 +89,7 @@ sub add_copyright
elsif ($ARGV =~ /\.c$/ ||
$ARGV =~ /\.cc$/ ||
$ARGV =~ /\.h$/ ||
+ $ARGV =~ /\.cpp$/ ||
$ARGV =~ /\.yy$/)
{
$start_copyright="/* ";