Skip to content

Commit

Permalink
Issue #261: cleaning up the help code ...
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Oct 18, 2019
1 parent 366ac89 commit 52c8c41
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@
set u SystemUser p swordfish
login

run
"Need to patch AbstractDictionary>>at:ifPresent: to use cull:"
AbstractDictionary
compileMethod: 'at: key ifPresent: aBlock
"Lookup the given key in the receiver. If it is present, answer the value of evaluating the given
block with the value associated with the key. Otherwise, answer nil."

| v |
v := self at: key ifAbsent: [ ^ nil ].
^ aBlock cull: v'
%
commit
#
# Already implemented in GLASS (tODE)
#
# run
# "Need to patch AbstractDictionary>>at:ifPresent: to use cull:"
# AbstractDictionary
# compileMethod: 'at: key ifPresent: aBlock
# "Lookup the given key in the receiver. If it is present, answer the value of evaluating the given
# block with the value associated with the key. Otherwise, answer nil."
#
# | v |
# v := self at: key ifAbsent: [ ^ nil ].
# ^ aBlock cull: v'
#%
# commit

#
# installation using Rowan gsdevkit_launcher rereqs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,27 @@ self halt.
projectDefinition_filetree export.
projectDefinition_tonel export.
]

{ #category : 'options' }
GdkL_CopyScriptClasses >> scriptMethodOptions [
^ super scriptMethodOptions,
{
#('write' nil #required #write:).
}
]

{ #category : 'usage' }
GdkL_CopyScriptClasses >> usageExamples: scriptName [

^ scriptName, '
', scriptName, ' --write=filetree GdkL_Error GdkL_Hello
', scriptName, ' -D -- --write=tonel GdkL_Error
'
]

{ #category : 'usage' }
GdkL_CopyScriptClasses >> usageSynopsis: scriptName [

^ (super usageSynopsis: scriptName), ' --write=[filetree|tonel] <script-class-names>'
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
usage
usage: scriptName shortDescription: shortDescription description: description
self stdout
nextPutAll:
(self manPageClass
fromString:
'NAME
' , scriptName , ' - ' , shortDescription
,
'.
SYNOPSIS
' , scriptName
,
' [ [-H] [-D] [-V] [ <st-vm-args> ] -- ] <script options>
----------
'
, (self usageSynopsis: scriptName)
,
'
DESCRIPTION
' , description
,
'
' , self usageDescription
,
'
-H
help. st_launcher script interpreter help message
-D
debug. bring up debugger if an error occurs while running script
-V
verbose. display more detail about script interpreter execution
<st-vm-args>
smalltalk vm specific arguments passed directly to vm when launching script
EXAMPLES
'
, (self usageStandardExamples: scriptName)
, (self usageExamples: scriptName)
,
'
')
printString
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
usage
usageDescription
^ '
--help
display this message
'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
usage
usageStandardExamples: scriptName
^ scriptName
,
' -h
' , scriptName
,
' --help
'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usage
usageSynopsis: scriptName
^ scriptName , ' [ -h | --help ] '
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'gsdevkit_launcher-Core'!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'gsdevkit_launcher-Core')

0 comments on commit 52c8c41

Please sign in to comment.