equal
deleted
inserted
replaced
1 # Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # Script to Generate the XML file that is suitable for Diamonds |
|
15 # |
|
16 # |
|
17 use strict; |
|
18 use FindBin; |
|
19 use lib "$FindBin::Bin"; |
|
20 use lib "$FindBin::Bin/lib"; |
|
21 use Getopt::Long; |
|
22 use GenDiamondsXml; |
|
23 |
|
24 my ($iStage, $iState, $iServer) = ProcessCommandLine(); |
|
25 |
|
26 &GenDiamondsXml::main($iStage, $iState, $iServer); |
|
27 |
|
28 # ProcessCommandLine |
|
29 # Description |
|
30 # This function processes the commandline |
|
31 |
|
32 sub ProcessCommandLine { |
|
33 my ($iHelp); |
|
34 |
|
35 GetOptions('h' => \$iHelp, 't=s' => \$iStage, 'i=s' => \$iState, 's=s' => \$iServer); |
|
36 |
|
37 if (($iHelp) || (!defined $iStage) || (!defined $iState) || (!defined $iServer)) { |
|
38 Usage(); |
|
39 } |
|
40 return ($iStage, $iState, $iServer); |
|
41 } |
|
42 |
|
43 # Usage |
|
44 # |
|
45 # Output Usage Information. |
|
46 |
|
47 sub Usage { |
|
48 print <<USAGE_EOF; |
|
49 |
|
50 Usage: GenDiamondsXml.pl [switches] |
|
51 |
|
52 [Switches] |
|
53 -t Stage (e.g. STARTBUILD|GT|TV|ROM|CBR|CDB|BUILD|SMOKETEST|ENDBUILD|ALL) |
|
54 -i (START|STOP) |
|
55 -s server (e.g. diamonds.nmp.nokia.com:9003) |
|
56 |
|
57 [Optional] |
|
58 -h help |
|
59 |
|
60 USAGE_EOF |
|
61 exit 1; |
|
62 } |
|
63 |
|
64 |
|