Files
ofbiz-framework/framework/base/ant-scripts/if-script.groovy
T
Adam Heath a60909100b Add a new ant task, <if><condition/><commands/><else/></if>, since
ant itself doesn't support such a construct.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@708699 13f79535-47bb-0310-9956-ffa450edef68
2008-10-28 22:08:24 +00:00

9 lines
201 B
Groovy

def condition = elements.condition
def commands
if (condition[0].eval()) {
commands = elements.commands
} else {
commands = elements.else
}
if (commands && !commands.isEmpty()) commands[0].execute()