aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/download.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-03 18:00:43 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-03 18:03:02 +0000
commita2db1f07f9d2bda6bed34fb359c44d6299cbbf5e (patch)
tree2b81752d2836e5bbda616730b9a1965c986310b4 /reproduce/src/make/download.mk
parent6384e3a5507a71412577ed0c985eb6e48aec4a2d (diff)
Added rpath in basic dependencies, remove input if download fails
Until now, we weren't including the `rpath' linking options to the basic dependencies. They are now added. Also, when the download of an input file fails for any reason, an empty file won't be replaced there any more.
Diffstat (limited to 'reproduce/src/make/download.mk')
-rw-r--r--reproduce/src/make/download.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/reproduce/src/make/download.mk b/reproduce/src/make/download.mk
index 260fd0c..5ef6c71 100644
--- a/reproduce/src/make/download.mk
+++ b/reproduce/src/make/download.mk
@@ -68,7 +68,8 @@ $(inputdatasets): $(indir)/%.fits: | $(indir) $(lockdir)
ln -s $(INDIR)/$$origname $@
else
touch $(lockdir)/download
- flock $(lockdir)/download wget -O$@ $$url/$$origname
+ flock $(lockdir)/download bash -c \
+ "if ! wget -O$@ $$url/$$origname; then rm -f $@; exit 1; fi"
fi
# Check the md5 sum to see if this is the proper dataset.