-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuncommonCommandExample.stone
executable file
·108 lines (103 loc) · 3.35 KB
/
uncommonCommandExample.stone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/env superdoit_stone
#
# examples of more esoteric commands: CUSTOMOPTIONS, INPUT, METHOD:,
# CLASSMETHOD:, PROJECTSHOME, SPECS, SPECURLS
#
customoptions
{
SuperDoitOptionalOptionWithNoArg long: 'noArg'.
SuperDoitOptionalOptionWithNoArg long: 'noArg' short: 'n'.
SuperDoitOptionalOptionWithRequiredArg long: 'optional'.
SuperDoitOptionalOptionWithRequiredArg long: 'optional' default: 'default'.
SuperDoitOptionalOptionWithRequiredArg long: 'optional' short: 'o'.
SuperDoitOptionalOptionWithRequiredArg long: 'optional' short: 'o' default: 'default'.
SuperDoitRequiredOptionWithRequiredArg long: 'required'.
SuperDoitRequiredOptionWithRequiredArg long: 'required' short: 'r'.
}
%
usage
-----
USAGE
# with GS_HOME set (<stone-name> optional if run in $GS_HOME/servers/stones/<stone-name> directory)
$basename [--help | -h] [--debug | -D] [-- [<stone-name> [<topaz-command-line-args>] ] ]
# with GEMSTONE set
$basename [--help | -h] [--debug | -D] -- ([-r] | -l | -L) -I <path-to-.topazini> [<topaz-command-line-args>]
DESCRIPTION
Example script demonstrating the most uncommon commands:
input
projectshome
specs
specurls
method:
classmethod:
doit
OPTIONS
<stone-name> Name of the GsDevKit_home stone. <stone-name> argument
may be skipped if the script is run in a GsDevKit_home
stone directory (i.e., $GS_HOME/server/stones/<stone-name>
<topaz-command-line-args> topaz options that should be passed to topaz when running
running the script
-h, --help display usage message
-D, --debug bring up topaz debugger in the event of a script error
--noArg | -n option with no argument
--optional | -o optional option with required argument
EXAMPLES
$basename --help -- gs_351 # with GS_HOME set
$basename -h -- -l -I ./.topazini # with GEMSTONE set
$basename --help <topaz-arguments>
$basename -D --required=arg <topaz-arguments>
$basename --required=arg <topaz-arguments>
$basename --required=arg --noArg <topaz-arguments>
$basename --required=arg --optional="non default" <topaz-arguments>
$basename --required=arg -o non-default <topaz-arguments>
$basename --required=arg -n -o non-default <topaz-arguments>
-----
%
INPUT
$SUPERDOIT_DIR/tests/gs/filein.gs
%
PROJECTSHOME
$SUPERDOIT_STONE_DIR/git
%
SPECS
[
RwLoadSpecificationV2 {
#specName : 'spec_0001',
#projectName : 'RowanSample9',
#gitUrl : '[email protected]:dalehenrich/RowanSample9.git',
#revision : 'spec_0001',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Core'
],
#customConditionalAttributes : [
],
#platformProperties : {
'gemstone' : {
'allusers' : {
#defaultSymbolDictName : 'RowanSample9_1'
}
}
},
#comment : 'Bare bones package structure -Core and -Tests'
}
]
%
SPECURLS
file:$SUPERDOIT_DIR/tests/specs/RowanSample9_spec_0001.ston
%
METHOD: Object
foo
^ 'foo'
%
CLASSMETHOD: Object
bar
^ 'bar'
%
doit
"write your code here"
"return value will be written in STON format to stdout.
Return `self noResult` to suppress writing STON
to stdout"
^ self noResult
%