|
The base syntax to start a CfgScript is: |
foreach (String arg in scriptargs)
{
out.println("Script Argument: " + arg);
}
|
Execute a Script passed as argument-e option:cfgscript -e 'out.println("hello");'
-e option depends on the operation system and shell you use.
Associate csf script file with the acdkcfgscript interpreter
#!/bin/sh
#!ignorenextline
eval 'exec acdkcfgscript $0 ${1:"$@"}'
System.out.println("executed"); // this is the first line of the real script
|
chmod +x scriptfile.csf).$ACDKHOME/bin path to the environment variable PATH and LD_LIBRARY_PATH.
CfgScript Options
-csfinclude / CSFINCLUDES-csfinclude option insert a search path for the
include statement.CSFINCLUDES environment variable, to declare a list of include path.export CSFINCLUDES=/usr/local/acdk/extmodules/csf:~/acdk/csf/include
set CSFINCLUDES=c:\programr\acdk\extmodules\csf;c:\MyDocs\acdk\csf\include
-csfpath / CSFPATH-csfpath insert a directory in the CSFPATH environment variable.
CfgScript ClassLoader.
-csfdebug
Debugging.
-csfdebugonfail-csfdebugonfail is set the interpreter branches to the
debugger
if any exception will be thrown.
acdk-optionsacdk-options are documented in
man acdk_core.
Script Environment
acdk::cfgscript::Script __script Instance of the current executed script.
acdk::cfgscript::Props __props The set of variables visible in current scope.true, false, Nil, null: as corresponing literal values.
acdk::io::PrintWriter out, err and in. Normally an alias to member of
acdk::lang::System.this if method is not static.super super class.