From 12f09836f7aebd41686776aa9adff6aed3a65b73 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 11 Jun 2017 14:16:04 +0200 Subject: [PATCH] freeswitch-stable: improve install/dir define - if source dir exists install the destination dir as it might not exist yet - if source dir does not exist do nothing (not even error out) Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 76533a0..714e948 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -191,11 +191,12 @@ define Package/$(PKG_NAME)/install/bin endef define Package/$(PKG_NAME)/install/dir - for dir in $$$$(shell cd $(2); find -type d -print | sed 's|^./\?||'); \ + if [ -d $(2) ]; then $(INSTALL_DIR) $(1); fi + for dir in $$$$(shell [ -d $(2) ] && cd $(2) && find -type d -print | sed 's|^./\?||'); \ do \ $(INSTALL_DIR) $(1)/$$$$$$$$dir; \ done - for file in $$$$(shell cd $(2); find -type f -print | sed 's|^./||'); \ + for file in $$$$(shell [ -d $(2) ] && cd $(2) && find -type f -print | sed 's|^./||'); \ do \ $(INSTALL_DATA) $(2)/$$$$$$$$file $(1)/$$$$$$$$file; \ done