summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDavid Marble <drmarble1@gmail.com>2017-01-12 00:21:36 -0600
committerScott Warner <tortel1210@gmail.com>2017-01-12 18:33:30 +0000
commit84cfb7f0d1d7d677eee4ef98d3a63de2c22dc29f (patch)
tree21495ac8edb6a7bfd9e7c30cfb542d66eb79c2d6 /build
parent1846ec0341efacef7f90012ff64bae440fa12f1c (diff)
downloadvendor_replicant-84cfb7f0d1d7d677eee4ef98d3a63de2c22dc29f.zip
vendor_replicant-84cfb7f0d1d7d677eee4ef98d3a63de2c22dc29f.tar.gz
vendor_replicant-84cfb7f0d1d7d677eee4ef98d3a63de2c22dc29f.tar.bz2
http_prebuilt: Improve retrieval of artifacts from archive
The current version always redownloads the artifact. Kali does not like the nested md5sum command and ignores it leaving file checksum value blank so the test always fails. A temporary variable is used to get around this limitation of kali. The echo "Downloading..." command has been modified to actually print and has been moved so it only does so when downloading the artifact. Change-Id: I115860a87e55399a652d6548fe50f6204337f854 (cherry picked from commit 20c06fd75e09f3910ec699bdc54eec08f6bb4594)
Diffstat (limited to 'build')
-rw-r--r--build/core/http_prebuilt.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/build/core/http_prebuilt.mk b/build/core/http_prebuilt.mk
index 9dc3975..4d7556a 100644
--- a/build/core/http_prebuilt.mk
+++ b/build/core/http_prebuilt.mk
@@ -47,11 +47,13 @@ define curl-checksum
endef
define audit-checksum
- @echo "Downloading: $(filename) (version $(version))" -> $(filepath);
$(hide) if [ ! -f $(filepath) ]; then \
+ echo "Downloading: $(filename) (version $(version)) -> $(filepath)"; \
$(call download-prebuilt-module, $(HTTP_FILE_URL),$(filepath)) \
else \
- if [ "$(shell echo $(md5sum $(filepath)))" != "$(shell cat $(checksum) | cut -d ' ' -f1)" ]; then \
+ temp_checksum=$(shell md5sum $(filepath) | cut -d ' ' -f1); \
+ if [ "$$temp_checksum" != "$(shell cat $(checksum) | cut -d ' ' -f1)" ]; then \
+ echo "Downloading: $(filename) (version $(version)) -> $(filepath)"; \
rm -rf $(filepath); \
$(call download-prebuilt-module, $(HTTP_FILE_URL),$(filepath)) \
fi; \