grails/grails-core — pull request #298 by uehaj (2012-12-12 15:48:12+00:00)
Title: changed to enable to use command line arguments supplied for the script....

... And to make include the script name in error message, change GroovyShell.evaluate(String) to GroovyShell.run(File).

Use of shell variable 'args' in groovy scripts are very common and useful. But in current implementation, scripts called from 'run-script' can't use args at all so fixed it.

As a side effect, in this version can't spcify multiple scripts at one command invocation of run-script.
It might be better to create another new script(for example 'run-batch') to use 'args' arguments from script.
I have not goot idea anymore so send in this form as a one proposal.

Best regards,