summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2015-09-18 11:14:28 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2015-09-18 09:15:18 +0000
commitc7dbe0fad10db9fe178ce18bbe501f8e678285a2 (patch)
tree0ed344cbc3957261b1da5ffc0b2f06cf972fafed
parent1b340aad0dd8246c3febfc397659749405bacc47 (diff)
Fixed cache logic
Change-Id: I904a4b8ebcab5aedefef287ff8bb5357dae8e3ff Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
-rw-r--r--fuel/build/cache.mk10
1 files changed, 4 insertions, 6 deletions
diff --git a/fuel/build/cache.mk b/fuel/build/cache.mk
index cc98f68..e0699a8 100644
--- a/fuel/build/cache.mk
+++ b/fuel/build/cache.mk
@@ -54,7 +54,7 @@ $(CACHEFILES):
@if [ ! -f $(BUILD_BASE)/$@ ]; then\
echo " " > $(BUILD_BASE)/$@;\
- ln -s $(BUILD_BASE)/$@ $(CACHE_DIR)/$@;\
+ ln -s $(BUILD_BASE)/$@ $(CACHE_DIR)/$@;\
rm -f $(BUILD_BASE)/$@;\
else\
ln -s $(BUILD_BASE)/$@ $(CACHE_DIR)/$@;\
@@ -62,12 +62,12 @@ $(CACHEFILES):
.PHONY: validate-cache
validate-cache: prepare $(CACHEVALIDATE)
- @if [[ $(shell md5sum $(BUILD_BASE)/config.mk | cut -f1 -d " ") != $(shell cat $(VERSION_FILE) | grep config.mk | awk '{print $$NF}') ]]; then\
+ @if [ "$(shell md5sum $(BUILD_BASE)/config.mk | cut -f1 -d " ")" != "$(shell cat $(VERSION_FILE) | grep config.mk | awk '{print $$NF}')" ]; then\
echo "Cache does not match current config.mk definition, cache must be rebuilt";\
exit 1;\
fi;
- @if [[ $(shell md5sum $(BUILD_BASE)/cache.mk | cut -f1 -d " ") != $(shell cat $(VERSION_FILE) | grep cache.mk | awk '{print $$NF}') ]]; then\
+ @if [ "$(shell md5sum $(BUILD_BASE)/cache.mk | cut -f1 -d " ")" != "$(shell cat $(VERSION_FILE) | grep cache.mk | awk '{print $$NF}')" ]; then\
echo "Cache does not match current cache.mk definition, cache must be rebuilt";\
exit 1;\
fi;
@@ -80,14 +80,12 @@ validate-cache: prepare $(CACHEVALIDATE)
then \
REMOTE_ID=$(shell git ls-remote $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG) | awk '{print $$(NF-1)}'); \
fi; \
- if [ $$REMOTE_ID != $(shell cat $(VERSION_FILE) | grep fuel | awk '{print $$NF}') ]; \
+ if [[ $$REMOTE_ID != $(shell cat $(VERSION_FILE) | grep fuel | awk '{print $$NF}') ]]; \
then \
echo "Cache does not match upstream Fuel, cache must be rebuilt!"; \
exit 1; \
fi
- #$(MAKE) -C opendaylight validate-cache
-
.PHONY: $(CACHEVALIDATE)
$(CACHEVALIDATE): %.validate:
@echo VALIDATE $(CACHEVALIDATE)