patch-tool-mxe: rename existing .git directories

winpcap has directory wpcap/libpcap/.git in its source tree.
Git considers wpcap/libpcap to be a submodule, which is unwanted.
This commit is contained in:
Boris Nagaev 2016-06-12 16:02:45 +03:00
parent 39f1107dbd
commit 1f60ecc373
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,8 @@ define INIT_GIT
# if PKG_SUBDIR is ".", the following will move gits/tmp/pkg
mv '$(abspath $(GITS_DIR)/tmp/$(1)/$($(1)_SUBDIR))' '$(call GIT_DIR,$(1))'
rm -rf '$(GITS_DIR)/tmp'
# rename existing .git directories if any
find '$(call GIT_DIR,$(1))' -name .git -prune -exec sh -c 'mv "$$0" "$$0"_' {} \;
# initialize git
$(call GIT_CMD,$(1)) init
$(call GIT_CMD,$(1)) add -A