"LOG_DIR", logDir);
String exitStatusFile = format("%s/rc", logDir);
run = new StatementList(ImmutableList.<Statement> builder().add(interpret("rm -f " + exitStatusFile))
.add(interpret(format("trap 'echo $?>%s' 0 1 2 3 15", exitStatusFile))).addAll(run.delegate()).build());
CreateRunScript createRunScript = createRunScript(instanceName,
concat(exports.keySet(), defaultExports.keySet()), "{varl}INSTANCE_HOME{varr}", run);
return new ScriptBuilder()
.addEnvironmentVariableScope("default", defaultExports)
.addEnvironmentVariableScope(instanceName, exports)