1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Added option local_sources for better linux packaging with predownloaded sources

This commit is contained in:
NicoHood 2016-10-04 00:04:15 +02:00 committed by Cristian Maglie
parent 1da91087e4
commit d3bd5f22bd

View File

@ -837,8 +837,21 @@
<!-- Retrieve tool --> <!-- Retrieve tool -->
<target name="untar-unzip-download" depends="untar-unzip-check" unless="${archive_file}_available"> <target name="untar-unzip-download" depends="untar-unzip-check" unless="${archive_file}_available">
<antcall target="untar-unzip-download-web" />
<antcall target="untar-unzip-download-local" />
</target>
<target name="untar-unzip-download-web" unless="local_sources">
<get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" /> <get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" />
</target> </target>
<target name="untar-unzip-download-local" if="local_sources">
<basename file="${archive_file}" property="basename" />
<echo>Skipping download of ${archive_url}, using makepkg downloaded ${basename}</echo>
<exec executable="ln" failonerror="true">
<arg value="-s" />
<arg value="${basedir}/../../${basename}" />
<arg value="${archive_file}" />
</exec>
</target>
<target name="untar-unzip-checksum" depends="untar-unzip-download"> <target name="untar-unzip-checksum" depends="untar-unzip-download">
<echo>Testing checksum of "${archive_file}"</echo> <echo>Testing checksum of "${archive_file}"</echo>