diff options
author | mysqldev@mysql.com <> | 2004-08-21 00:02:45 +0200 |
---|---|---|
committer | mysqldev@mysql.com <> | 2004-08-21 00:02:45 +0200 |
commit | 325ea1b991b885eb491cc2201cdafbc6b5446f75 (patch) | |
tree | c5d3bfa179eb92bdb5ec2ffff662a0e9168f07de /Build-tools/mysql-copyright | |
parent | 949348f5766146a5acefd5672f1d5d278790f35a (diff) | |
download | mariadb-git-325ea1b991b885eb491cc2201cdafbc6b5446f75.tar.gz |
mysql-copyright:
Fixed it to work, added function to fix include/mysql_version.h LICENSE tag from GPL to Commercial
Diffstat (limited to 'Build-tools/mysql-copyright')
-rwxr-xr-x | Build-tools/mysql-copyright | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright index 16f0738dc76..92b8f13bf48 100755 --- a/Build-tools/mysql-copyright +++ b/Build-tools/mysql-copyright @@ -115,6 +115,9 @@ sub main # fix file copyrights &fix_usage_copyright(); &add_copyright(); + + # fix LICENSE tag in include/mysql_version.h + &fix_mysql_version(); # rename the directory with new distribution name chdir("$WD/$dir"); @@ -142,6 +145,28 @@ sub main } #### +#### This function will s/GPL/Commercial/ in include/mysql_version.h for the +#### LICENSE tag. +#### +sub fix_mysql_version +{ + chdir("$destdir"); + my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h'; + + open(MYSQL_VERSION,"<$header_file") or die "Unable to open include/mysql_version.h for read: $!\n"; + undef $/; + my $mysql_version= <MYSQL_VERSION>; + close(MYSQL_VERSION); + + $mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/; + + open(MYSQL_VERSION,">$header_file") or die "Unable to open include/mysql_version.h for write: $!\n"; + print MYSQL_VERSION $mysql_version; + close(MYSQL_VERSION); + chdir("$cwd"); +} + +#### #### This function will remove unwanted parts of a src tree for the mysqlcom #### distributions. #### @@ -151,11 +176,7 @@ sub trim_the_fat my $cwd= getcwd(); system("rm -rf $destdir/${the_fat}"); - if ($win_flag) - { - chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n"; - } - else + if (!$win_flag) { chdir("$destdir"); unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; |