|
10 | 10 | # Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
11 | 11 | # Portions Copyright (c) 1994, Regents of the University of California
|
12 | 12 | #
|
13 |
| -# $PostgreSQL: pgsql/src/backend/catalog/genbki.pl,v 1.5 2010/01/0619:56:29 tgl Exp $ |
| 13 | +# $PostgreSQL: pgsql/src/backend/catalog/genbki.pl,v 1.6 2010/01/0622:02:45 tgl Exp $ |
14 | 14 | #
|
15 | 15 | #----------------------------------------------------------------------
|
16 | 16 |
|
|
40 | 40 | {
|
41 | 41 | push@include_path,length($arg) > 2 ?substr($arg, 2) :shift@ARGV;
|
42 | 42 | }
|
43 |
| -elsif ($arg =~/^--set-version=(\d+\.\d+)$/) |
| 43 | +elsif ($arg =~/^--set-version=(.*)$/) |
44 | 44 | {
|
45 | 45 | $major_version =$1;
|
| 46 | +die"Version must be in format nn.nn.\n" |
| 47 | +if !($major_version =~/^\d+\.\d+$/); |
46 | 48 | }
|
47 | 49 | else
|
48 | 50 | {
|
|
53 | 55 | # Sanity check arguments.
|
54 | 56 | die"No input files.\n"if !@input_files;
|
55 | 57 | die"No include path; you must specify -I at least once.\n"if !@include_path;
|
56 |
| -die"Version not specified or wrong format.\n"if !defined$major_version; |
| 58 | +die"--set-version must be specified.\n"if !defined$major_version; |
57 | 59 |
|
58 | 60 | # Make sure output_path ends in a slash.
|
59 | 61 | if ($output_pathne'' &&substr($output_path, -1)ne'/')
|
|