<exec executable="/bin/sh">
<arg value="chancode.sh"/>
<arg value="GBK"/>
<arg value="UTF8"/>
<arg value="src/main/webapp/scube_ui/images/"/>
</exec>

脚本内容:convmv -f $1 -t $2 -r $3 –notest
convmv 是修改编码的脚本,可以修改文件名。
convmv -f 原编码 -t 目标编码 -r 递归的目录 -notest (非测试,直接修改,)

直接执行:

<target name="versioncode">
        <exec executable="sh" outputproperty="v_code">
            <arg value="-c" />
            <arg value="svnversion | sed -e 's/^[^:]*://;s/[A-Za-z]//'" />
        </exec>
        <echo>Revision (app): ${v_code}</echo>
        <replaceregexp file="AndroidManifest.xml" match='android:versionCode="0"' replace='android:versionCode="${v_code}"' />
</target>

Q.E.D.


知之为知之