Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rooterkyberian/bbfecf66048cae16ce7a to your computer and use it in GitHub Desktop.
Save rooterkyberian/bbfecf66048cae16ce7a to your computer and use it in GitHub Desktop.
Index: scripts/feeds
===================================================================
--- scripts/feeds (revision 44245)
+++ scripts/feeds (working copy)
@@ -118,10 +118,10 @@
'update' => "",
'revision' => "echo -n 'local'"},
'src-git' => {
- 'init' => "git clone --depth 1 '%s' '%s'",
- 'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'",
- 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
- 'update' => "git pull --ff",
+ 'init' => "git clone --depth 1 '%s' '%s' && cd '%s' && git submodule update --init --depth 1 && cd -",
+ 'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s' && cd '%s' && git submodule update --init --depth 1 && cd -",
+ 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && git submodule update --init --depth 1 && cd -",
+ 'update' => "git pull --ff --recurse-submodules",
'controldir' => ".git",
'revision' => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},
'src-gitsvn' => {
@@ -162,11 +162,11 @@
if( $relocate || !$m->{'update'} || !-d "$localpath/$m->{'controldir'}" ) {
system("rm -rf '$safepath'");
if ($m->{'init_branch'} and $branch) {
- system(sprintf($m->{'init_branch'}, $branch, $base_branch, $safepath)) == 0 or return 1;
+ system(sprintf($m->{'init_branch'}, $branch, $base_branch, $safepath, $safepath)) == 0 or return 1;
} elsif ($m->{'init_commit'} and $commit) {
system(sprintf($m->{'init_commit'}, $base_commit, $safepath, $safepath, $commit, $commit)) == 0 or return 1;
} else {
- system(sprintf($m->{'init'}, $src, $safepath)) == 0 or return 1;
+ system(sprintf($m->{'init'}, $src, $safepath, $safepath)) == 0 or return 1;
}
} elsif ($m->{'init_commit'} and $commit) {
# in case git hash has been provided don't update the feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment