Makefile: patches-export: Remove existing patches 95/46595/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 2 Nov 2017 21:57:18 +0000 (22:57 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 2 Nov 2017 22:01:54 +0000 (23:01 +0100)
In case patch filenames changed, clear the old patches from the
destination directory prior to exporting new patches.

Change-Id: I65e56ae042dca1c769a0f68a449b3b0e7d7d25dc
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Makefile

index e7cd2c6..68a85bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,7 @@ submodules-clean: .submodules-init
 patches-export: .submodules-init
        @git submodule -q foreach ' \
                SUB_DIR=${A_PATCH_DIR}/$$name; \
+               rm -rf $$SUB_DIR/*; \
                git tag | awk "!/root/ && /${A_OPNFV_TAG}-fuel/" | while read A_TAG; do \
                        SUB_FEATURE=`dirname $${A_TAG#${A_OPNFV_TAG}-fuel/}`; \
                        echo "`tput setaf 2`== exporting $$name ($$A_TAG)`tput sgr0`"; \