Skip to content

Commit f462191

Browse files
author
Federico Fissore
committed
build.xml: moved checksum into untar-unzip-checksum
1 parent 00ecd55 commit f462191

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

build/build.xml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,7 @@
552552
<get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" />
553553
</target>
554554

555-
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
556-
<target name="untar" depends="untar-unzip-download" unless="${archive_file}_installed">
555+
<target name="untar-unzip-checksum" depends="untar-unzip-download">
557556
<echo>Testing checksum of "${archive_file}"</echo>
558557
<checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
559558
<condition property="checksum.matches.fail">
@@ -564,8 +563,10 @@
564563
File ${archive_file} failed checksum.
565564
Please remove "${archive_file}" to download it again.
566565
</fail>
566+
</target>
567567

568-
<!-- Unzip tool to the destination folder -->
568+
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
569+
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
569570
<echo>Unzipping into folder ${dest_folder}</echo>
570571
<exec executable="tar">
571572
<arg value="xfz"/>
@@ -574,19 +575,7 @@
574575
</exec>
575576
</target>
576577

577-
<target name="unzip" depends="untar-unzip-download" unless="${archive_file}_installed">
578-
<echo>Testing checksum of "${archive_file}"</echo>
579-
<checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
580-
<condition property="checksum.matches.fail">
581-
<equals arg1="${checksum.matches}" arg2="false"/>
582-
</condition>
583-
<fail if="checksum.matches.fail">Checksum failed.
584-
585-
File ${archive_file} failed checksum.
586-
Please remove "${archive_file}" to download it again.
587-
</fail>
588-
589-
<!-- Unzip tool to the destination folder -->
578+
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
590579
<echo>Unzipping into folder ${dest_folder}</echo>
591580
<mkdir dir="${dest_folder}" />
592581
<exec executable="unzip">

0 commit comments

Comments
 (0)