Skip to content

Commit d757b67

Browse files
author
Federico Fissore
committed
libastylej.zip now downloaded once for all archs and verified agains SHA checksum
1 parent 70e4c35 commit d757b67

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ hardware/arduino/bootloaders/caterina_LUFA/Caterina.lss
1313
hardware/arduino/bootloaders/caterina_LUFA/Caterina.elf
1414
hardware/arduino/bootloaders/caterina_LUFA/Caterina.eep
1515
hardware/arduino/bootloaders/caterina_LUFA/.dep/
16+
build/libastylej-*.zip
1617
build/windows/work/
1718
build/windows/jre.zip
1819
build/windows/libastylej*

build/build.xml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@
265265
<fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/man"/>
266266
</delete>
267267

268-
<get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="macosx" usetimestamp="true" skipexisting="true"/>
269-
<unzip src="macosx/libastylej-2.04.zip" dest="macosx" overwrite="true"/>
268+
<antcall target="unzip-libastyle" />
270269
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" />
271270
<chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" />
272271
</target>
@@ -480,8 +479,7 @@
480479
<copy todir="linux/work" file="linux/dist/arduino" />
481480
<chmod perm="755" file="linux/work/arduino" />
482481

483-
<get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="linux" usetimestamp="true" skipexisting="true" />
484-
<unzip src="linux/libastylej-2.04.zip" dest="linux" overwrite="true"/>
482+
<antcall target="unzip-libastyle" />
485483
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
486484
<chmod perm="755" file="linux/work/lib/libastylej.so" />
487485
</target>
@@ -545,7 +543,21 @@
545543
</exec>
546544
</target>
547545

546+
<target name="unzip-libastyle">
547+
<get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="." usetimestamp="true" ignoreerrors="true" verbose="true" />
548548

549+
<checksum file="libastylej-2.04.zip" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
550+
<condition property="checksum.matches.fail">
551+
<equals arg1="${checksum.matches}" arg2="false"/>
552+
</condition>
553+
<fail if="checksum.matches.fail">Checksum failed.
554+
555+
File libastylej-2.04.zip failed checksum.
556+
Please remove "libastylej-2.04.zip" and download it again.
557+
</fail>
558+
559+
<unzip src="libastylej-2.04.zip" dest="${staging_folder}" overwrite="true"/>
560+
</target>
549561

550562
<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
551563
<!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
@@ -741,8 +753,7 @@
741753
<param name="file_arch" value="win32" />
742754
</antcall>
743755

744-
<get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="windows" usetimestamp="true" skipexisting="true" />
745-
<unzip src="windows/libastylej-2.04.zip" dest="windows" overwrite="true"/>
756+
<antcall target="unzip-libastyle" />
746757
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />
747758

748759
<!-- Copy bossac.exe tool -->

build/libastylej-2.04.zip.sha

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
46097a6689ff4b5c7a5def5427185f11f6e5dd2a

0 commit comments

Comments
 (0)