awips2/edexOsgi/build.edex/deploy-common/deploy-setup.xml

74 lines
2 KiB
XML
Raw Normal View History

<project>
<target name="setup">
<!-- read the properties -->
<property file="${basedir}/edex/common.properties" />
<property file="${basedir}/edex/developer.properties" />
<!-- Determine where we are. -->
<!-- actually evaluate the directory instead of using relative pathing. -->
<shellscript shell="bash"
outputproperty="awips.baseline.directory"
dir="${basedir}">
cd ../
dirpath=`pwd`
dir=`basename ${dirpath}`
if [ "${dir}" = "edexOsgi" ]; then
# we are in the distributed development environment
cd ../
pwd
else
# all of the projects are in the workspace or one single directory
echo ${dirpath}
fi
</shellscript>
<!-- construct the list of "basedirectories" -->
<propertyselector property="baseline.variables"
delimiter="${path.separator}"
match="dir.([0-9][0-9])"
select="\1"
casesensitive="true" />
<var name="basedirectories"
value="${awips.baseline.directory}" />
<for list="${baseline.variables}" param="index"
delimiter="${path.separator}">
<sequential>
<propertycopy property="variable.name"
override="true"
from="dir.@{index}" />
<var name="base.directory"
value="${awips.baseline.directory}/${variable.name}" />
<if>
<available file="${base.directory}" type="dir" />
<then>
<var name="basedirectories"
value="${base.directory};${basedirectories}" />
</then>
</if>
<!-- add the associated wa directory if it exists. -->
<if>
<not>
<equals arg1="${wa.root.directory}" arg2="" />
</not>
<then>
<var name="wa.base.directory"
value="${wa.root.directory}/${variable.name}" />
<if>
<available file="${wa.base.directory}"
type="dir" />
<then>
<var name="basedirectories"
value="${wa.base.directory};${basedirectories}" />
</then>
</if>
</then>
</if>
</sequential>
</for>
</target>
</project>