You can specify a custom build file to be used in DITA-OT transformations by editing the transformation scenario that you are using. In the Advanced tab you should change the Custom build file path to point to the custom build file.
<project basedir="." default="dist"> <!--The DITA OT default build file--> <import file="build.xml"/> <target name="dist"> <!-- You could run your script here --> <!--<exec></exec>--> <!--Call the DITA OT default target--> <antcall target="init"/> </target> </project>