<project name="build-tools" basedir="." default="main">
    <target name="main">
        <echo>Common build file.</echo>
    </target>

    <target name="check-n98magerun">
        <property name="output.IS_FILE_EXISTS" value="false" />
        <exec command="if [ -f 'dev/tools/n98-magerun.phar' ]; then echo 'true'; else echo 'false'; fi;" outputProperty="output.IS_FILE_EXISTS" />
        <if>
            <equals arg1="${output.IS_FILE_EXISTS}" arg2="false" />
            <then>
                <exec command="mkdir -p dev/tools/" />
                <exec command="wget http://files.magerun.net/n98-magerun-latest.phar -O n98-magerun.phar" />
                <exec command="chmod +x n98-magerun.phar" />
                <exec command="mv n98-magerun.phar dev/tools/" />
            </then>
        </if>
    </target>
</project>

