Skip to content

Instantly share code, notes, and snippets.

@nxhack
Created August 16, 2017 05:38
Show Gist options
  • Save nxhack/78fa1df0a1224a168191dd1ab5b3336e to your computer and use it in GitHub Desktop.
Save nxhack/78fa1df0a1224a168191dd1ab5b3336e to your computer and use it in GitHub Desktop.
OpenWrt 15.05 : git submodule command not work properly.
diff --git a/include/download.mk b/include/download.mk
index e518cce..614f76c 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -90,8 +90,9 @@ define DownloadMethod/git
cd $(TMP_DIR)/dl && \
rm -rf $(SUBDIR) && \
[ \! -d $(SUBDIR) ] && \
- git clone $(URL) $(SUBDIR) --recursive && \
- (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \
+ git clone $(OPTS) $(URL) $(SUBDIR) && \
+ (cd $(SUBDIR) && git checkout $(VERSION) && \
+ git submodule update --init --recursive) && \
echo "Packing checkout..." && \
rm -rf $(SUBDIR)/.git && \
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment