diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index 2d59b239523..5dd6640276f 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -390,10 +390,10 @@ ifneq ($(strip $(WIZARDS_DIR)),) $(MSG) "Create DSM Version specific Wizards: $(WIZARDS_DIR)$(TCVERSION)"; \ find $${SPKSRC_WIZARDS_DIR}$(TCVERSION) -maxdepth 1 -type f -and \( $(WIZARD_FILE_NAMES) \) -print -exec cp -f {} $(DSM_WIZARDS_DIR) \; ;\ fi -endif -ifneq ($(wildcard $(DSM_WIZARDS_DIR)/*),) - @find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -not -name "*.sh" -print -exec chmod 0644 {} \; - @find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -name "*.sh" -print -exec chmod 0755 {} \; + @if [ -d "$(DSM_WIZARDS_DIR)" ]; then \ + find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -not -name "*.sh" -print -exec chmod 0644 {} \; ;\ + find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -name "*.sh" -print -exec chmod 0755 {} \; ;\ + fi endif .PHONY: conf