Created
February 6, 2015 12:33
-
-
Save rooterkyberian/bbfecf66048cae16ce7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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