puppet/arduino/Makefile
Ossi Salmi d785e48a55 Fix curl error handling in Makefiles
Add option -f to make curl fail on server errors. Fixes #7.
2013-08-14 14:16:24 +03:00

26 lines
792 B
Makefile

include $(CURDIR)/../Makefile.inc
VERSION = 1.0
TARGET32 = arduino32-$(VERSION).tgz
SOURCE32 = http://arduino.googlecode.com/files/arduino-$(VERSION)-linux.tgz
TARGET64 = arduino64-$(VERSION).tgz
SOURCE64 = http://arduino.googlecode.com/files/arduino-$(VERSION)-linux64.tgz
all: download manifest
download: $(PACKAGES)/$(TARGET32) $(PACKAGES)/$(TARGET64)
manifest: $(MANIFESTS)/arduino.pp
$(PACKAGES)/$(TARGET32):
@umask 022; echo $@; \
test -f $@ || curl -f -o $@ $(SOURCE32)
$(PACKAGES)/$(TARGET64):
@umask 022; echo $@; \
test -f $@ || curl -f -o $@ $(SOURCE64)
$(MANIFESTS)/arduino.pp: $(PACKAGES)/$(TARGET32) $(PACKAGES)/$(TARGET64)
@umask 022; echo $@; \
echo '$$arduino32_package_latest = "$(TARGET32)"' > $@ && \
echo '$$arduino64_package_latest = "$(TARGET64)"' >> $@