summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9ea75dd..a492b9a 100644
--- a/Makefile
+++ b/Makefile
@@ -64,9 +64,11 @@ ifneq ($(PW_NEEDED),)
$(error No root password is set, set it as ROOTPW in your environment.)
else
$(foreach cur,$(PW_NEEDED),\
- $(shell printf "$(ROOTPW)" | $(HASHER) --check --status "$(firstword $(subst /, ,$(cur)))/base/rootpw.$(HASHER)")\
- $(if $(filter 1,$(.SHELLSTATUS)),\
- $(error The wrong ROOTPW is set. Please correct it)))
+ $(eval cur_dir := $(firstword $(subst /, ,$(cur)))/base)\
+ $(if $(shell test -d "$(cur_dir)" && echo yes),\
+ $(shell echo "$(ROOTPW)" | $(HASHER) --check --status "$(cur_dir)/rootpw.$(HASHER)")\
+ $(if $(filter 1,$(.SHELLSTATUS)),\
+ $(error The wrong ROOTPW is set. Please correct it))))
endif
endif