aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-04-25 11:31:48 +0200
committerFelix Fietkau <nbd@nbd.name>2018-04-27 15:19:19 +0200
commit41ab276fe4d6a18f7bf875b4727474104fc4e136 (patch)
treef67fc95ec2c0fdfc9db2e99d13e6af72339a523a /scripts
parent67aec988c4c51e8c9fb180e96438291599db6645 (diff)
downloadupstream-41ab276fe4d6a18f7bf875b4727474104fc4e136.tar.gz
upstream-41ab276fe4d6a18f7bf875b4727474104fc4e136.tar.bz2
upstream-41ab276fe4d6a18f7bf875b4727474104fc4e136.zip
scripts/feeds: add support for git feeds with submodules
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/feeds6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/feeds b/scripts/feeds
index f49cdb3e45..437af035fd 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -133,6 +133,7 @@ my %update_method = (
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
'update' => "git pull --ff",
'update_force' => "git pull --ff || (git reset --hard HEAD; git pull --ff; exit 1)",
+ 'post_update' => "git submodule update --init --recursive",
'controldir' => ".git",
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'src-git-full' => {
@@ -141,6 +142,7 @@ my %update_method = (
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
'update' => "git pull --ff",
'update_force' => "git pull --ff || (git reset --hard HEAD; git pull --ff; exit 1)",
+ 'post_update' => "git submodule update --init --recursive",
'controldir' => ".git",
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'src-gitsvn' => {
@@ -197,6 +199,10 @@ sub update_feed_via($$$$$) {
}
system("cd '$safepath'; $update_cmd") == 0 or return 1;
}
+ if ($m->{'post_update'}) {
+ my $cmd = $m->{'post_update'};
+ system("cd '$safepath'; $cmd") == 0 or return 1;
+ }
return 0;
}