|
1 #!fshell |
|
2 # tlotsofscriptargs.script |
|
3 # |
|
4 # Copyright (c) 2010 Accenture. All rights reserved. |
|
5 # This component and the accompanying materials are made available |
|
6 # under the terms of the "Eclipse Public License v1.0" |
|
7 # which accompanies this distribution, and is available |
|
8 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 # |
|
10 # Initial Contributors: |
|
11 # Accenture - Initial contribution |
|
12 # |
|
13 |
|
14 source $SCRIPT_PATH\errordef.script |
|
15 |
|
16 var myarg == "abc123" || $Error |
|
17 var myint == 123 || $Error |
|
18 var myuint == 291 || $Error |
|
19 var myfile == "$0" || $Error |
|
20 var myreal == "3.141" || $Error |
|
21 var myenum == enumsecondvalue || $Error |
|
22 |
|
23 exit # Like __END__ in perl this stops the fshell parser tripping over the CIF data |
|
24 |
|
25 ==name tlotsofscriptargs |
|
26 |
|
27 ==short-description |
|
28 |
|
29 An example of a script that uses CIF syntax. |
|
30 |
|
31 ==argument string myarg |
|
32 |
|
33 An example argument. Fshell defines the environment variable $myarg based on what the first argument to the script is (ie $1). Must be set to "abc123". |
|
34 |
|
35 ==argument int myint |
|
36 |
|
37 Must be 123. |
|
38 |
|
39 ==argument uint myuint |
|
40 |
|
41 Must be 291 (0x123). |
|
42 |
|
43 ==argument filename myfile |
|
44 |
|
45 Must equal $0. |
|
46 |
|
47 ==argument real myreal |
|
48 |
|
49 Must be 3.141 |
|
50 |
|
51 ==argument enum myenum |
|
52 |
|
53 Must equal "enumsecondvalue". |
|
54 |
|
55 ==enum-value enumfirstval |
|
56 |
|
57 ==enum-value enumsecondvalue |
|
58 |
|
59 ==enum-value enumthirdvalue |
|
60 |
|
61 ==option bool o opt |
|
62 |
|
63 An option. |