summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild-tools/mysql-copyright27
-rw-r--r--include/my_pthread.h1
-rw-r--r--sql/filesort.cc1
-rw-r--r--sql/gen_lex_hash.cc15
-rw-r--r--sql/item.h2
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/records.cc1
7 files changed, 21 insertions, 28 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright
index 70b65d3f2cf..a798ee7ab65 100755
--- a/Build-tools/mysql-copyright
+++ b/Build-tools/mysql-copyright
@@ -3,8 +3,11 @@
# Untar a MySQL distribution, change the copyright texts,
# pack it up again to a given directory
-$VER="1.2";
+$VER="1.3";
+use Cwd;
+use File::Basename;
+use File::Copy;
use Getopt::Long;
$opt_help = 0;
@@ -17,8 +20,7 @@ GetOptions("help","version","target=s") || error();
# fix the directory prefix for target dir
-$WD= `pwd`;
-chop $WD;
+$WD= cwd();
$opt_target= $WD . '/' . $opt_target;
&main();
@@ -73,11 +75,11 @@ sub main
$newdistname= $1."com".$2.$3;
}
# find out the extract path (should be same as distname!)
- $destdir= `tar tvzf ../$distfile | head -1`;
- # remove leading crab
- $destdir =~ s/.*\d+:\d+:\d+[ ]//;
- # remove newline and slash from the end
- $destdir= substr($destdir, 0, -2);
+ chomp($destdir= `tar ztf ../$distfile | head -1`);
+ # remove slash from the end
+ $destdir= substr($destdir, 0, -1);
+ print "destdir: $destdir\n";
+ print "distname: $distname\n";
if ("$destdir" ne "$distname")
{
@@ -96,15 +98,18 @@ sub main
# remove the 'PUBLIC' file from distribution and copy MySQLEULA.txt
# on the toplevel of the directory instead. file 'PUBLIC' shouldn't
# exist in the new mysql distributions, but let's be sure..
- `rm -f $destdir/PUBLIC $destdir/README`;
- `cp -p $WD/Docs/MySQLEULA.txt $destdir/`;
+ unlink("$destdir/PUBLIC", "$destdir/README");
+ copy("$WD/Docs/MySQLEULA.txt", "$destdir");
+ # remove readline subdir
+ `rm -rf $destdir/cmd-line-utils/readline`;
+
# fix file copyrights
&fix_usage_copyright();
&add_copyright();
# rename the directory with new distribution name
- `mv -f $destdir $newdistname`;
+ rename($destdir, $newdistname);
# tar the new distribution
`tar cz -f $opt_target/$newdistname.tar.gz *`;
diff --git a/include/my_pthread.h b/include/my_pthread.h
index f4976abee10..424452a9298 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -1,4 +1,3 @@
-
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 13989bdae8f..1b481924690 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -1,4 +1,3 @@
-
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc
index dc4f23db3b2..7126b7ee577 100644
--- a/sql/gen_lex_hash.cc
+++ b/sql/gen_lex_hash.cc
@@ -430,18 +430,9 @@ int main(int argc,char **argv)
exit(1);
printf("/* Copyright (C) 2001 MySQL AB\n\
- This program is free software; you can redistribute it and/or modify\n\
- it under the terms of the GNU General Public License as published by\n\
- the Free Software Foundation; either version 2 of the License, or\n\
- (at your option) any later version.\n\n\
- This program is distributed in the hope that it will be useful,\n\
- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
- GNU General Public License for more details.\n\n\
- You should have received a copy of the GNU General Public License\n\
- along with this program; if not, write to the Free Software\n\
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307\
- USA */\n\n");
+ This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
+ and you are welcome to modify and redistribute it under the GPL license\n\
+ \n*/\n\n");
printf("/* This code is generated by gen_lex_hash.cc that seeks for\
a perfect\nhash function */\n\n");
diff --git a/sql/item.h b/sql/item.h
index 9f767d502ba..b2d67a661a6 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2003
+/* Copyright (C) 2000-2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 2179ef1188e..e7dc3933c10 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2003
+/* Copyright (C) 2000-2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sql/records.cc b/sql/records.cc
index 72a6d480356..7ba9ff0f42f 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -1,4 +1,3 @@
-
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify