summaryrefslogtreecommitdiff
path: root/Build-tools/mysql-copyright
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2000-10-24 02:39:54 +0300
committermonty@donna.mysql.com <>2000-10-24 02:39:54 +0300
commita67ff1bf0800746d474f44b5886461fbf8fa4781 (patch)
tree73129936be11d0b1bee843a961a70f81aeae1a6b /Build-tools/mysql-copyright
parent634b93850edbc1273fbb7312130636532b99dcd1 (diff)
downloadmariadb-git-a67ff1bf0800746d474f44b5886461fbf8fa4781.tar.gz
Update of interface for BDB tables.
Fixed bug in SHOW CREATE TABLE
Diffstat (limited to 'Build-tools/mysql-copyright')
-rwxr-xr-xBuild-tools/mysql-copyright32
1 files changed, 26 insertions, 6 deletions
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright
index a4eac33ded8..f481325bebb 100755
--- a/Build-tools/mysql-copyright
+++ b/Build-tools/mysql-copyright
@@ -3,16 +3,17 @@
# Untar a MySQL distribution, change the copyright texts,
# pack it up again to a given directory
-$VER="1.1";
+$VER="1.2";
use Getopt::Long;
-$opt_help= 0;
-$opt_target= "mysql-copyright-target-";
-$opt_target.= `date +%d%m%y-%H%M%S`;
+$opt_help = 0;
+$opt_version = 0;
+$opt_target = "mysql-copyright-target-";
+$opt_target .= `date +%d%m%y-%H%M%S`;
chop $opt_target;
-GetOptions("help","target=s") || usage();
+GetOptions("help","version","target=s") || error();
# fix the directory prefix for target dir
@@ -32,7 +33,13 @@ sub main
my $REG_VERSION = '[0-9\.\-]+[a-z]?[0-9\.\-]+?(.alpha|.beta|.gamma|pre\d|[0-9\.\-a-z])?';
my $target;
- usage() if (!$ARGV[0] || $opt_help);
+ if ($opt_version)
+ {
+ print "$0 version $VER by Jani Tolonen\n";
+ exit(0);
+ }
+ usage() if ($opt_help);
+ print error() if ($#ARGV == -1);
`mkdir -p $opt_target`;
$pec= $? >> 8;
@@ -210,3 +217,16 @@ Options:
EOF
exit(0);
}
+
+####
+#### error
+####
+
+sub error
+{
+ if ($#ARGV == -1)
+ {
+ print "Too few arguments to $0!\n";
+ }
+ exit(1);
+}