Skip to content

Instantly share code, notes, and snippets.

@mattupstate
Created July 6, 2010 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattupstate/464853 to your computer and use it in GitHub Desktop.
Save mattupstate/464853 to your computer and use it in GitHub Desktop.
<!-- Set's the FLEX_HOME property based on a command line parameter or environment variable. -->
<target name="init">
<if>
<equals arg1="${FLEX_HOME}" arg2="$${FLEX_HOME}" />
<then>
<if>
<equals arg1="${env.FLEX_HOME}" arg2="$${env.FLEX_HOME}" />
<then>
<fail message="Variable FLEX_HOME does not exist. Set an environment variable or pass Ant a parameter like so: ant -DFLEX_HOME='/sdk/flex/4.1' compile-swf" />
</then>
<else>
<property name="FLEX_HOME" value="${env.FLEX_HOME}" />
</else>
</if>
</then>
</if>
<echo>FLEX_HOME: ${FLEX_HOME}</echo>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment