--- a/Smalltalk.st Wed Nov 02 17:58:54 2016 +0100
+++ b/Smalltalk.st Wed Nov 02 18:04:46 2016 +0100
@@ -4315,7 +4315,7 @@
while reading patches- and rc-file, do not add things into change-file
"
Class withoutUpdatingChangesDo:[
- |commandFile defaultRC prevCatchSetting
+ |commandFiles rcFile defaultRC prevCatchSetting
isEval isPrint isFilter isRepl idxFileArg process|
isEval := isPrint := isFilter := isRepl := false.
@@ -4426,9 +4426,12 @@
"look for a '-f filename' or '--file filename' argument
if scripting, this is loaded before -P, -E or -R action.
if not scripting, this will force evaluation of filename instead of smalltalk.rc"
- idxFileArg := CommandLineArguments indexOfAny:#('-f' '--file').
- (idxFileArg ~~ 0) ifTrue:[
- commandFile := CommandLineArguments at:idxFileArg+1.
+ [
+ idxFileArg := CommandLineArguments indexOfAny:#('-f' '--file').
+ (idxFileArg ~~ 0)
+ ] whileTrue:[
+ commandFiles isNil ifTrue:[ commandFiles := OrderedCollection new ].
+ commandFiles add:(CommandLineArguments at:idxFileArg+1).
CommandLineArguments removeAtIndex:idxFileArg+1; removeAtIndex:idxFileArg.
].
@@ -4473,13 +4476,15 @@
].
"/ all of the above allow for a -f file to be loaded before any other action
- (commandFile notNil) ifTrue:[
- VerboseStartup == true ifTrue:[
- ('Smalltalk [info]: reading command file from: "', commandFile, '".') infoPrintCR.
- ].
- (self secureFileIn:commandFile) ifFalse:[
- ('Smalltalk [error]: "', commandFile, '" not found.') errorPrintCR.
- OperatingSystem exit:1.
+ (commandFiles notEmptyOrNil) ifTrue:[
+ commandFiles do:[:commandFile |
+ VerboseStartup == true ifTrue:[
+ ('Smalltalk [info]: reading command file from: "', commandFile, '".') infoPrintCR.
+ ].
+ (self secureFileIn:commandFile) ifFalse:[
+ ('Smalltalk [error]: "', commandFile, '" not found.') errorPrintCR.
+ OperatingSystem exit:1.
+ ]
]
].
@@ -4558,13 +4563,15 @@
].
].
- commandFile notNil ifTrue:[
+ commandFiles notNil ifTrue:[
SilentLoading := true. "/ suppress the hello & copyright messages
self addStartBlock:
[
- (self secureFileIn:commandFile) ifFalse:[
- ('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR.
- OperatingSystem exit:1.
+ commandFiles do:[:commandFile |
+ (self secureFileIn:commandFile) ifFalse:[
+ ('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR.
+ OperatingSystem exit:1.
+ ].
].
].
@@ -4580,8 +4587,8 @@
"/ look for <command>.rc
"/ if not found, read smalltalk.rc (or stxapp.rc for standAlone operation)
- commandFile := self commandName asFilename withSuffix:'rc'.
- (didReadRCFile := commandFile exists and:[self secureFileIn:commandFile]) ifFalse:[
+ rcFile := self commandName asFilename withSuffix:'rc'.
+ (didReadRCFile := rcFile exists and:[self secureFileIn:rcFile]) ifFalse:[
StandAlone ifFalse:[
defaultRC := 'smalltalk.rc' "/asFilename
] ifTrue:[