aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-09-26 18:08:38 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-09-26 18:08:38 +0400
commit47daa78cbd3d11b0ad6b3a78a947ddc4a4cb0f2f (patch)
tree741acf52315b927d4e1de0fcb66e12d1b44e62d6
parent4ce294e83ccc859c158cea62c299ee7176b19660 (diff)
downloadcibs-47daa78cbd3d11b0ad6b3a78a947ddc4a4cb0f2f.tar.gz
Download carefully
-rw-r--r--rules/archive.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/rules/archive.mk b/rules/archive.mk
index 5a8e9c6..411ca27 100644
--- a/rules/archive.mk
+++ b/rules/archive.mk
@@ -44,7 +44,15 @@ validate: validate-stamp
archive-downloader := /usr/share/cibs/scripts/download-archive
download-%-stamp:
- [ -f "$*" ] || $(archive-downloader) "$*" $(download_$*) $(download)
+ if ! [ -f '$*' ]; then \
+ if [ -n '$(download_$*)' ]; then \
+ $(archive-downloader) '$*' '$(download_$*)'; \
+ elif [ -n '$(download)' ]; then \
+ $(archive-downloader) '$*' '$(download)'; \
+ else \
+ echo '** ERROR: No "dowload" variable is set'; false; \
+ fi; \
+ fi
touch $@
download-stamp: $$(addprefix download-,$$(addsuffix -stamp,$$(archives) $$(archive)))