Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
848 dpurdie 1
########################################################################
2
# Copyright (C) 2008 ERG Limited, All rights reserved
3
#
4
# Module name   : buildtool
5
# Module type   : build system
6
# Compiler(s)   : n/a
7
# Environment(s): jats
8
#
9
# Description   : A simple program to invoke the escrow tool
10
#
11
# Usage         : jats eprog gen_escrow <bom_id>
12
#
13
#
14
#......................................................................#
15
 
870 dpurdie 16
require 5.006_001;
848 dpurdie 17
use strict;
18
use warnings;
19
 
20
use JatsError;                                  # Common error reporting
21
use JatsEnv;
22
use JatsSystem;
23
 
24
#
25
#   Globals
26
#
27
our $GBE_DM_LOCATION;
28
our $GBE_DM_USERNAME;
29
our $GBE_DM_PASSWORD;
30
 
31
my $prog = 'escrowD.jar';
32
 
33
 
34
#
35
#   Expecting one user argument so lets parse it
36
#
37
help() unless ( $ARGV[0] );
38
 
39
#
40
#   Ensure that essential environment variables are set
41
#
42
EnvImport('GBE_DM_LOCATION');
43
EnvImport('GBE_DM_USERNAME');
44
EnvImport('GBE_DM_PASSWORD');
45
 
46
#
47
#   Ensure that the required jar is in the same directory
48
#   It cannot be run from another directory
49
#
50
unless ( -f $prog )
51
{
52
    Error ("The program $prog is not in the current directory");
53
}
54
 
55
#
56
#   Run the program
57
#
58
my $rv = JatsCmd( QuoteCommand(
59
                    '-java=1.6',
60
                    'eprog', $prog,
61
                    '-c', $GBE_DM_LOCATION,
62
                    '-u', $GBE_DM_USERNAME,
63
                    '-p', $GBE_DM_PASSWORD,
64
                    '-b', @ARGV ));
65
 
66
exit $rv;
67
 
68
#-------------------------------------------------------------------------------
69
# Function        : help
70
#
71
# Description     : Simple help
72
#
73
# Inputs          : 
74
#
75
# Returns         : 
76
#
77
sub help
78
{
79
    print   "Usage: jats eprog gen_escrow <bom_id>\n".
80
            "Where:\n".
81
            "    bom_id        - An SBOM Identifier(number)\n"
82
            ;
83
 
84
    exit 1;
85
}