Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ant -Dbuild.target=32 dist
- ant -Dbuild.target=64 dist
- <var name ="os.bitness" value ="unknown"/>
- <if>
- <os family="windows"/>
- <then>
- <exec dir="." executable="cmd" outputproperty="command.ouput">
- <arg line="/c SET ProgramFiles(x86)"/>
- </exec>
- <if>
- <contains string="${command.ouput}" substring="Program Files (x86)"/>
- <then>
- <var name ="os.bitness" value ="64"/>
- </then>
- <else>
- <var name ="os.bitness" value ="32"/>
- </else>
- </if>
- </then>
- <elseif>
- <os family="unix"/>
- <then>
- <exec dir="." executable="/bin/sh" outputproperty="command.ouput">
- <arg line="/c uname -m"/>
- </exec>
- <if>
- <contains string="${command.ouput}" substring="_64"/>
- <then>
- <var name ="os.bitness" value ="64"/>
- </then>
- <else>
- <var name ="os.bitness" value ="32"/>
- </else>
- </if>
- </then>
- </elseif>
- </if>
- <echo>OS bitness: ${os.bitness}</echo>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement