Skip to content

Commit

Permalink
LRQA-13469 - Add a new command 'mirrors-get' to use for local downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhashimoto authored and brianchandotcom committed Feb 25, 2015
1 parent bc116d7 commit af50830
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,45 @@ Please set the environment variable ANT_OPTS to the recommended value of
</sequential>
</macrodef>

<macrodef name="mirrors-get">
<attribute name="dest" />
<attribute default="false" name="ignoreerrors" />
<attribute default="false" name="skipexisting" />
<attribute name="src" />
<attribute default="false" name="verbose" />

<sequential>
<propertyregex
input="@{src}"
override="true"
property="mirrors.src"
regexp="http://"
replace="http://mirrors/"
/>

<trycatch>
<try>
<get
dest="@{dest}"
ignoreerrors="@{ignoreerrors}"
skipexisting="@{skipexisting}"
src="${mirrors.src}"
verbose="@{verbose}"
/>
</try>
<catch>
<get
dest="@{dest}"
ignoreerrors="@{ignoreerrors}"
skipexisting="@{skipexisting}"
src="@{src}"
verbose="@{verbose}"
/>
</catch>
</trycatch>
</sequential>
</macrodef>

<macrodef name="release-to-repo-macro">
<attribute name="bndRootFile" />
<attribute name="file" />
Expand Down

0 comments on commit af50830

Please sign in to comment.