Check if executable command exists using ant -
is possible check if command exists part of ant task. example, want ensure "yasm" command present part of ant task. possible? if so, can provide example?
the best way can think of using available
task combined if
in subsequent target. if take @ task page see can check see if exists set property. example:
<available file="/path/to/my/file" type="file" property="file.present"/>
then in target <target name='foo' if='file.present'>
that doesn't check executable permissions closer. if task exists check executable permission still combine if
in target.
original answer
it better use ant copy task instead of trying execute cp
yourself. keeps platform independent.
<copy todir"/some/target"> <fileset dir="/some/src"/> </copy>
more usage on ant documentation copy task.
Comments
Post a Comment