Skip to content

Commit

Permalink
libastylej.zip now downloaded once for all archs and verified agains …
Browse files Browse the repository at this point in the history
…SHA checksum
  • Loading branch information
Federico Fissore committed Oct 7, 2014
1 parent 70e4c35 commit d757b67
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ hardware/arduino/bootloaders/caterina_LUFA/Caterina.lss
hardware/arduino/bootloaders/caterina_LUFA/Caterina.elf
hardware/arduino/bootloaders/caterina_LUFA/Caterina.eep
hardware/arduino/bootloaders/caterina_LUFA/.dep/
build/libastylej-*.zip
build/windows/work/
build/windows/jre.zip
build/windows/libastylej*
Expand Down
23 changes: 17 additions & 6 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@
<fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/man"/>
</delete>

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

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

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

<checksum file="libastylej-2.04.zip" 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 libastylej-2.04.zip failed checksum.
Please remove "libastylej-2.04.zip" and download it again.
</fail>

<unzip src="libastylej-2.04.zip" dest="${staging_folder}" overwrite="true"/>
</target>

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

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

<!-- Copy bossac.exe tool -->
Expand Down
1 change: 1 addition & 0 deletions build/libastylej-2.04.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
46097a6689ff4b5c7a5def5427185f11f6e5dd2a

0 comments on commit d757b67

Please sign in to comment.