|
| 1 | +#!/usr/bin/env superdoit_solo |
| 2 | +options |
| 3 | +{ |
| 4 | + SuperDoitOptionalOptionWithRequiredArg long: 'directory'. |
| 5 | +} |
| 6 | +% |
| 7 | +usage |
| 8 | +----- |
| 9 | +USAGE $basename [--help | -h] [--debug | -D] [--debugGem] [--directory=<gemstone-directory>] |
| 10 | + |
| 11 | +DESCRIPTION |
| 12 | + Read from filetree repository and write project to a single topaz format .gs file. |
| 13 | + |
| 14 | + With no options, the output will be written to gemstone/'bitmapcharacterset.gs. |
| 15 | + |
| 16 | +OPTIONS |
| 17 | + -h, --help display usage message |
| 18 | + -D, --debug bring up topaz debugger in the event of a script error |
| 19 | + --debugGem If terminal is connected to stdout, bring up debugger. If not, |
| 20 | + dump stack to stdout and wait for topaz to attach using topaz |
| 21 | + DEBUGGEM command. |
| 22 | + --directory=<gemstone-directory> |
| 23 | + Write xml-xmlparser.gs source file to <gemstone-directory>. |
| 24 | + |
| 25 | +EXAMPLES |
| 26 | + $basename --help |
| 27 | + $basename -D |
| 28 | + $basename --debugGem |
| 29 | + |
| 30 | + $basename |
| 31 | + $basename --directory=$HOME/dhenrich/ |
| 32 | +----- |
| 33 | +% |
| 34 | +doit |
| 35 | + | dirRef project t2f2tRoot | |
| 36 | + self directory |
| 37 | + ifNil: [ dirRef := self dirname parent / 'gemstone' ] |
| 38 | + ifNotNil: [:path | dirRef := path asFileReference ]. |
| 39 | + dirRef ensureCreateDirectory. |
| 40 | + t2f2tRoot := self dirname parent / 't2f2t'. |
| 41 | + project := Rowan |
| 42 | + projectFromUrl: 'file://' , (t2f2tRoot / 'specs' / 'filetree.ston') pathString |
| 43 | + diskUrl: 'file://', self dirname parent pathString. |
| 44 | + project |
| 45 | + readPackageNamesBlock:[ :packageName | |
| 46 | + "exclude 31x, Baseline, ConfigurationOf GT and Pharo packages" |
| 47 | + (packageName includesString: '31x') not and: [ (packageName includesString: 'Pharo') not and: [(packageName includesString: 'GT') not and: [(packageName includesString: 'Baseline') not and: [(packageName includesString: 'ConfigurationOf') not]]]]]. |
| 48 | + project |
| 49 | + exportTopazFormatTo: (dirRef / 'bitmapcharacterset.gs') pathString |
| 50 | + logClassCreation: false |
| 51 | + excludeClassInitializers: false |
| 52 | + excludeRemoveAllMethods: true. |
| 53 | + ^ true |
| 54 | +% |
0 commit comments