Subversion Repositories DevTools

Rev

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

Rev 271 Rev 279
Line 36... Line 36...
36
use Getopt::Long;
36
use Getopt::Long;
37
use File::Find;
37
use File::Find;
38
use File::Copy;
38
use File::Copy;
39
use File::Path;
39
use File::Path;
40
use Cwd;
40
use Cwd;
41
use Sys::Hostname;                          # For hostname
-
 
42
 
41
 
43
my $VERSION = "1.0.0";                      # Update this
42
my $VERSION = "1.0.0";                      # Update this
44
 
43
 
45
#
44
#
46
#   Options
45
#   Options
Line 77... Line 76...
77
my $USER            = $ENV{'USER'};
76
my $USER            = $ENV{'USER'};
78
my $UNIX            = $ENV{'GBE_UNIX'};
77
my $UNIX            = $ENV{'GBE_UNIX'};
79
my $HOME            = $ENV{'HOME'};
78
my $HOME            = $ENV{'HOME'};
80
my $GBE_SANDBOX     = $ENV{'GBE_SANDBOX'};
79
my $GBE_SANDBOX     = $ENV{'GBE_SANDBOX'};
81
my $GBE_ABT         = $ENV{'GBE_ABT'} || '0';
80
my $GBE_ABT         = $ENV{'GBE_ABT'} || '0';
-
 
81
my $MACHINENAME     = $ENV{'GBE_HOSTNAME'};
82
 
82
 
83
#
83
#
84
#   Globals
84
#   Globals
85
#
85
#
86
my $MACHINENAME;
-
 
87
my $VIEWDIR_ROOT = "c:/clearcase";          # Root of all static views (WIN32)
86
my $VIEWDIR_ROOT = "c:/clearcase";          # Root of all static views (WIN32)
88
my $VIEWDIR;                                # Absolute path to the view
87
my $VIEWDIR;                                # Absolute path to the view
89
my $VIEWPATH;                               # Path relative to clearcase
88
my $VIEWPATH;                               # Path relative to clearcase
90
my $user_cwd;
89
my $user_cwd;
91
my $error = 0;
90
my $error = 0;
Line 228... Line 227...
228
#
227
#
229
#   Determine the machine type
228
#   Determine the machine type
230
#
229
#
231
Verbose ("Machine Type: UNIX=$UNIX");
230
Verbose ("Machine Type: UNIX=$UNIX");
232
 
231
 
233
$MACHINENAME = hostname;
-
 
234
Error ("Machine Name not determined")
232
Error ("Machine Name not determined")
235
    unless ( $MACHINENAME );
233
    unless ( $MACHINENAME );
236
chomp( $MACHINENAME );
-
 
237
$user_cwd = getcwd;
234
$user_cwd = getcwd;
238
 
235
 
239
Error ("USER name not determined" )
236
Error ("USER name not determined" )
240
    unless ( $USER );
237
    unless ( $USER );
241
 
238
 
Line 582... Line 579...
582
    my $build_dir = $be->{dir};
579
    my $build_dir = $be->{dir};
583
    chdir ("$build_dir") or Error( "Cannot chdir to build directory: $build_dir");
580
    chdir ("$build_dir") or Error( "Cannot chdir to build directory: $build_dir");
584
    if ( $opt_dpkg )
581
    if ( $opt_dpkg )
585
    {
582
    {
586
        Message ("Using: $build_dir");
583
        Message ("Using: $build_dir");
587
        my $create_opts = "-o";
584
        my @create_opts = "-o";
588
        $create_opts .= " -m" if ( $opt_merge );
585
        push @create_opts ,"-m" if ( $opt_merge );
589
        JatsCmd('-here', 'create_dpkg', $create_opts, '-pname', $be->{name}, '-pversion', $be->{version}) and $error++;
586
        JatsCmd('-here', 'create_dpkg', @create_opts, '-pname', $be->{name}, '-pversion', $be->{version}) and $error++;
590
    }
587
    }
591
 
588
 
592
    if ( $opt_copy )
589
    if ( $opt_copy )
593
    {
590
    {
594
        Message ("Copy package to $user_cwd");
591
        Message ("Copy package to $user_cwd");