Subversion Repositories DevTools

Rev

Rev 7047 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6914 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
 
16
require 5.006_001;
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( '-java=1.6',
59
                    'eprog', $prog,
60
                    '-c', $GBE_DM_LOCATION,
61
                    '-u', $GBE_DM_USERNAME,
62
                    '-p', $GBE_DM_PASSWORD,
63
                    '-b', @ARGV );
64
 
65
exit $rv;
66
 
67
#-------------------------------------------------------------------------------
68
# Function        : help
69
#
70
# Description     : Simple help
71
#
72
# Inputs          : 
73
#
74
# Returns         : 
75
#
76
sub help
77
{
78
    print   "Usage: jats eprog gen_escrow <bom_id>\n".
79
            "Where:\n".
80
            "    bom_id        - An SBOM Identifier(number)\n"
81
            ;
82
 
83
    exit 1;
84
}