Merge pull request #1390 from LuaAndC/patch-rename-git

patch-tool-mxe: rename existing .git directories
This commit is contained in:
Tony Theodore 2016-06-13 23:09:10 +10:00 committed by GitHub
commit 4ae1df5b9e
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