mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
build.xml: moved checksum into untar-unzip-checksum
This commit is contained in:
parent
00ecd5585d
commit
f462191dba
@ -552,8 +552,7 @@
|
||||
<get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" />
|
||||
</target>
|
||||
|
||||
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
|
||||
<target name="untar" depends="untar-unzip-download" unless="${archive_file}_installed">
|
||||
<target name="untar-unzip-checksum" depends="untar-unzip-download">
|
||||
<echo>Testing checksum of "${archive_file}"</echo>
|
||||
<checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
|
||||
<condition property="checksum.matches.fail">
|
||||
@ -564,8 +563,10 @@
|
||||
File ${archive_file} failed checksum.
|
||||
Please remove "${archive_file}" to download it again.
|
||||
</fail>
|
||||
</target>
|
||||
|
||||
<!-- Unzip tool to the destination folder -->
|
||||
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
|
||||
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
||||
<echo>Unzipping into folder ${dest_folder}</echo>
|
||||
<exec executable="tar">
|
||||
<arg value="xfz"/>
|
||||
@ -574,19 +575,7 @@
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="unzip" depends="untar-unzip-download" unless="${archive_file}_installed">
|
||||
<echo>Testing checksum of "${archive_file}"</echo>
|
||||
<checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
|
||||
<condition property="checksum.matches.fail">
|
||||
<equals arg1="${checksum.matches}" arg2="false"/>
|
||||
</condition>
|
||||
<fail if="checksum.matches.fail">Checksum failed.
|
||||
|
||||
File ${archive_file} failed checksum.
|
||||
Please remove "${archive_file}" to download it again.
|
||||
</fail>
|
||||
|
||||
<!-- Unzip tool to the destination folder -->
|
||||
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
||||
<echo>Unzipping into folder ${dest_folder}</echo>
|
||||
<mkdir dir="${dest_folder}" />
|
||||
<exec executable="unzip">
|
||||
|
Loading…
Reference in New Issue
Block a user