Subversion Repositories DevTools

Rev

Rev 325 | Rev 347 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 325 Rev 341
Line 41... Line 41...
41
#
41
#
42
my $opt_help = 0;
42
my $opt_help = 0;
43
my $opt_verbose = 0;
43
my $opt_verbose = 0;
44
my $opt_rtagid;
44
my $opt_rtagid;
45
my $opt_show;
45
my $opt_show;
46
my $opt_outfile = 'auto.pl';
46
my $opt_outfile;
47
 
47
 
48
my $result = GetOptions (
48
my $result = GetOptions (
49
                "help|h:+"          => \$opt_help,
49
                "help|h:+"          => \$opt_help,
50
                "manual:3"          => \$opt_help,
50
                "manual:3"          => \$opt_help,
51
                "verbose:+"         => \$opt_verbose,       # flag or number
51
                "verbose:+"         => \$opt_verbose,       # flag or number
Line 65... Line 65...
65
#   Configure the error reporting process now that we have the user options
65
#   Configure the error reporting process now that we have the user options
66
#
66
#
67
ErrorConfig( 'name'    =>'UPDDEP',
67
ErrorConfig( 'name'    =>'UPDDEP',
68
             'verbose' => $opt_verbose );
68
             'verbose' => $opt_verbose );
69
 
69
 
-
 
70
#
-
 
71
#   Allow some comand line options
-
 
72
#       -rtag_id=xxx
-
 
73
#        rtag_id=xxx
-
 
74
#
-
 
75
foreach ( @ARGV )
-
 
76
{
-
 
77
    if ( m~^rtag_id=(.*)~ ) {
-
 
78
        $opt_rtagid = $1;
-
 
79
    } else {
-
 
80
        Error ("Unknown command line argument: $_");
-
 
81
    }
-
 
82
}
-
 
83
 
70
 
84
 
71
Error( "No operation specified" )
85
Error( "No operation specified" )
72
    unless ( $opt_rtagid || defined  $opt_show );
86
    unless ( $opt_rtagid || defined  $opt_show );
73
 
87
 
74
#
88
#
-
 
89
#   Intelligently select output file
-
 
90
#       Use auto.pl if it exists
-
 
91
#       use build.pl if auto.??? does not exist and its writable
-
 
92
#
-
 
93
unless ( $opt_outfile )
-
 
94
{
-
 
95
    if ( -e 'auto.pl' ) {
-
 
96
        $opt_outfile = 'auto.pl';
-
 
97
    } elsif ( -e 'build.pl' && -w 'build.pl'  ) {
-
 
98
        $opt_outfile = 'build.pl';
-
 
99
    } else {
-
 
100
        $opt_outfile = 'auto.pl';
-
 
101
    }
-
 
102
}
-
 
103
 
-
 
104
#
75
#   Connect to the RM database
105
#   Connect to the RM database
76
#       Uses infor from the JATS environment
106
#       Uses infor from the JATS environment
77
#           GBE_RM_LOCATION
107
#           GBE_RM_LOCATION
78
#           GBE_RM_USERNAME
108
#           GBE_RM_USERNAME
79
#           GBE_RM_PASSWORD
109
#           GBE_RM_PASSWORD
Line 353... Line 383...
353
of this utility.
383
of this utility.
354
 
384
 
355
=item B<-out=file>
385
=item B<-out=file>
356
 
386
 
357
This option specifies the name of the output file in which the modified build
387
This option specifies the name of the output file in which the modified build
358
information will be placed. The default name is auto.pl'.
388
information will be placed. The utility will use 'auto.pl' unless there is
-
 
389
no 'auto.pl' file and the 'build.pl' exists and is writable.
359
 
390
 
360
=back
391
=back
361
 
392
 
362
=head1 DESCRIPTION
393
=head1 DESCRIPTION
363
 
394