The macro is used to execute a Unix shell command, via /bin/sh, as part of a build script.
The following table describes the macro specific attributes for the macro:
| Macro Specific Attributes | ||
| Attribute | Description | Required |
| cmd | The command to execute. | Yes |
| dir | The directory in which the command should be executed. The default is the current directory. | No |
| failonerror |
Stop the build process if the command exits with a return code signaling failure. The default is true.
|
No |
| output | The name of a property in which the output of the command should be stored. | No |
| outerr | The name of a property in which the standard error of the command should be stored. | No |
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2020. All Rights Reserved.
Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
-->
<project
basedir="."
default="all"
name="Example"
xmlns:xt="antlib:com.ibm.team.build.extensions.toolkit">
<description>Example</description>
<!-- Load build extensions -->
<xt:loadBuildExtensions/>
<xt:getJarLocation property="jarPath"/>
<!-- Load common resources -->
<import>
<javaresource name="scripts/smpe/imports/$common.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
<!-- - - - - - - - - - - - - - - - - - - *
* Example *
*- - - - - - - - - - - - - - - - - - - -->
<target name="main" description="main">
<UnixShellCommand cmd="myscript.sh"/>
</target>
<target depends="main" description="all" name="all"/>
</project>