aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-12-07 16:30:59 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-12-07 16:30:59 +0000
commit8f8d351a4ff123e36b7b6efb69732f61b708a396 (patch)
treecfa5fa363c1119f53fcba009a449fb330950896d
parentf02bf4b4b072dab0be0aeb365b7a379f85fb2d66 (diff)
downloadupstream-8f8d351a4ff123e36b7b6efb69732f61b708a396.tar.gz
upstream-8f8d351a4ff123e36b7b6efb69732f61b708a396.tar.bz2
upstream-8f8d351a4ff123e36b7b6efb69732f61b708a396.zip
BB: scripts/feeds: add support for optionally using a full clone of git repositories
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Backport of r45668 git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@47805 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xscripts/feeds9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/feeds b/scripts/feeds
index 26c2de0945..be1bebd29e 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -49,7 +49,7 @@ sub parse_config() {
$line++;
my $valid = 1;
- $line[0] =~ /^src-\w+$/ or $valid = 0;
+ $line[0] =~ /^src-[\w-]+$/ or $valid = 0;
$line[1] =~ /^\w+$/ or $valid = 0;
@src = split /\s+/, $line[2];
$valid or die "Syntax error in feeds.conf, line: $line\n";
@@ -124,6 +124,13 @@ my %update_method = (
'update' => "git pull --ff",
'controldir' => ".git",
'revision' => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},
+ 'src-git-full' => {
+ 'init' => "git clone '%s' '%s'",
+ 'init_branch' => "git clone --branch '%s' '%s' '%s'",
+ 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
+ 'update' => "git pull --ff",
+ 'controldir' => ".git",
+ 'revision' => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},
'src-gitsvn' => {
'init' => "git svn clone -r HEAD '%s' '%s'",
'update' => "git svn rebase",