Subversion Repositories DevTools

Rev

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

Rev 317 Rev 319
Line 48... Line 48...
48
my $opt_time = 0;
48
my $opt_time = 0;
49
my $opt_help = 0;
49
my $opt_help = 0;
50
my $opt_locate = 0;
50
my $opt_locate = 0;
51
my $opt_locate_file;
51
my $opt_locate_file;
52
my $opt_locate_package;
52
my $opt_locate_package;
-
 
53
my $opt_locate_dir;
53
my $opt_dir;
54
my $opt_dir;
54
my $opt_java;
55
my $opt_java;
55
my $opt_export_vars = 1;
56
my $opt_export_vars = 1;
56
my $result;
57
my $result;
57
 
58
 
Line 115... Line 116...
115
            "debug:+"           => \$GBE_DEBUG,
116
            "debug:+"           => \$GBE_DEBUG,
116
            "cd|changedir=s"    => \$opt_dir,
117
            "cd|changedir=s"    => \$opt_dir,
117
            "locate"            => \$opt_locate,
118
            "locate"            => \$opt_locate,
118
            "locatefile=s"      => \$opt_locate_file,
119
            "locatefile=s"      => \$opt_locate_file,
119
            "locatepkg=s"       => \$opt_locate_package,
120
            "locatepkg=s"       => \$opt_locate_package,
-
 
121
            "locatedir=s"       => \$opt_locate_dir,
120
            "here"              => \$opt_here,
122
            "here"              => \$opt_here,
121
            "time"              => \$opt_time,
123
            "time"              => \$opt_time,
122
            "b|buildfile=s"     => \&opts_buildfile,
124
            "b|buildfile=s"     => \&opts_buildfile,
123
            "java=s"            => \$opt_java,
125
            "java=s"            => \$opt_java,
124
            "version=s",        => \&opts_version,
126
            "version=s",        => \&opts_version,
Line 466... Line 468...
466
        ReportError("Release Manager EnvVar needs to be defined: $var") unless ( $ENV{$var} );
468
        ReportError("Release Manager EnvVar needs to be defined: $var") unless ( $ENV{$var} );
467
    }
469
    }
468
}
470
}
469
 
471
 
470
################################################################################
472
################################################################################
-
 
473
#   Locate a specified directory - normally a view root
-
 
474
#   Scan upwards from the current directory loccing for the specified path
-
 
475
#
-
 
476
if ( $opt_locate_dir )
-
 
477
{
-
 
478
    my ($path) = scan_for_dir ($opt_locate_dir);
-
 
479
    Error ("Cannot locate directory: $opt_locate_dir") unless ( $path );
-
 
480
    change_dir ( $path );
-
 
481
}
-
 
482
 
-
 
483
################################################################################
471
#
484
#
472
#   Change to the required root directory
485
#   Change to the required root directory
473
#       The user may specify a start directory( -c )
486
#       The user may specify a start directory( -c )
474
#
487
#
475
change_dir ( $opt_dir );
488
change_dir ( $opt_dir );
Line 1093... Line 1106...
1093
sub scan_for_dir
1106
sub scan_for_dir
1094
{
1107
{
1095
    my ($target) = @_;
1108
    my ($target) = @_;
1096
    Verbose2 ("Scan for $target");
1109
    Verbose2 ("Scan for $target");
1097
 
1110
 
1098
    my $test_dir = $CWD;
1111
    my $test_dir = $CWD || getcwd();
1099
    {
1112
    {
1100
        do
1113
        do
1101
        {
1114
        {
1102
            #
1115
            #
1103
            #   Stop at /home to prevent unix automounter spitting
1116
            #   Stop at /home to prevent unix automounter spitting
Line 2060... Line 2073...
2060
    -debug[=n]          - Enable debug mode of JATS scripts
2073
    -debug[=n]          - Enable debug mode of JATS scripts
2061
    -here               - Disable JATS auto locate of build.pl
2074
    -here               - Disable JATS auto locate of build.pl
2062
    -locate             - Locate build.pl file and change to directory
2075
    -locate             - Locate build.pl file and change to directory
2063
    -locatepkg=pkg      - Locate build.pl. Resolve multiple files via pkg
2076
    -locatepkg=pkg      - Locate build.pl. Resolve multiple files via pkg
2064
    -locatefile=file    - Locate specified file and change to directory
2077
    -locatefile=file    - Locate specified file and change to directory
-
 
2078
    -locatedir=name     - Locate specified directory by scanning tothe root
2065
    -platform=[name]    - Set GBE_PLATFORM to name   (=+ to append)
2079
    -platform=[name]    - Set GBE_PLATFORM to name   (=+ to append)
2066
    -buildfilter=[xxx]  - Set GBE_BUILDFILTER to xxx (=+ to append)
2080
    -buildfilter=[xxx]  - Set GBE_BUILDFILTER to xxx (=+ to append)
2067
    -abt=[xxx]          - Set GBE_ABT to xxx (=+ to append)
2081
    -abt=[xxx]          - Set GBE_ABT to xxx (=+ to append)
2068
    -java=version       - Alters java version used (1.4, 1.5)
2082
    -java=version       - Alters java version used (1.4, 1.5)
2069
    -time               - Time build and compile times
2083
    -time               - Time build and compile times
Line 2189... Line 2203...
2189
=item B<-locatefile=file>
2203
=item B<-locatefile=file>
2190
 
2204
 
2191
This option is similar to the B<-locate> option, but it allows the name of the
2205
This option is similar to the B<-locate> option, but it allows the name of the
2192
file to be located to be specified.
2206
file to be located to be specified.
2193
 
2207
 
-
 
2208
=item B<-locatedir=name>
-
 
2209
 
-
 
2210
Locate the named directory by scanning from the current directory to the root
-
 
2211
of the filesystem. This operationis performed before any other location
-
 
2212
operations and before the B<-cd=path> operation.
-
 
2213
 
-
 
2214
It may be used to position the jats operation at the root of a view - provided
-
 
2215
the view root is known.
-
 
2216
 
2194
=item B<-platform=[name]>
2217
=item B<-platform=[name]>
2195
 
2218
 
2196
This option will set the JATS specific environment variable GBE_PLATFORM to
2219
This option will set the JATS specific environment variable GBE_PLATFORM to
2197
the specified name. The existing value of GBE_PLATFORM may be extended by
2220
the specified name. The existing value of GBE_PLATFORM may be extended by
2198
using "=+".
2221
using "=+".