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 <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2017-06-11 14:16:04 +02:00
parent a7e10e99e5
commit 12f09836f7
1 changed files with 3 additions and 2 deletions

View File

@ -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