scripts/feeds: allow export of feeds with static revisions
Add a switch to scripts/feeds that allows listing the feeds with their currently checked out revisions in feeds.conf compatible format. This allows providing a feeds.conf for public builds to make replication of the build easier. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46706
This commit is contained in:
parent
e0d332cdbe
commit
0d54d44349
1 changed files with 10 additions and 1 deletions
|
@ -314,7 +314,7 @@ sub list_feed {
|
||||||
sub list {
|
sub list {
|
||||||
my %opts;
|
my %opts;
|
||||||
|
|
||||||
getopts('r:d:nsh', \%opts);
|
getopts('r:d:nshf', \%opts);
|
||||||
if ($opts{h}) {
|
if ($opts{h}) {
|
||||||
usage();
|
usage();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -342,6 +342,14 @@ sub list {
|
||||||
if ($opts{d}) {
|
if ($opts{d}) {
|
||||||
printf "%s%s%s%s%s%s%s\n", $feed->[1], $opts{d}, $feed->[0], $opts{d}, $revision, $opts{d}, join(", ", @{$feed->[2]});
|
printf "%s%s%s%s%s%s%s\n", $feed->[1], $opts{d}, $feed->[0], $opts{d}, $revision, $opts{d}, join(", ", @{$feed->[2]});
|
||||||
}
|
}
|
||||||
|
elsif ($opts{f}) {
|
||||||
|
my $uri = join(", ", @{$feed->[2]});
|
||||||
|
if ($revision ne "local" && $revision ne "X") {
|
||||||
|
$uri =~ s/[;^].*//;
|
||||||
|
$uri .= "^" . $revision;
|
||||||
|
}
|
||||||
|
printf "%s %s %s\n", $feed->[0], $feed->[1], $uri;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
printf "\%-8s \%-8s \%-8s \%s\n", $feed->[1], $feed->[0], $revision, join(", ", @{$feed->[2]});
|
printf "\%-8s \%-8s \%-8s \%s\n", $feed->[1], $feed->[0], $revision, join(", ", @{$feed->[2]});
|
||||||
}
|
}
|
||||||
|
@ -758,6 +766,7 @@ Commands:
|
||||||
-s : List of feed names and their URL.
|
-s : List of feed names and their URL.
|
||||||
-r <feedname>: List packages of specified feed.
|
-r <feedname>: List packages of specified feed.
|
||||||
-d <delimiter>: Use specified delimiter to distinguish rows (default: spaces)
|
-d <delimiter>: Use specified delimiter to distinguish rows (default: spaces)
|
||||||
|
-f : List feeds in feeds.conf compatible format (when using -s).
|
||||||
|
|
||||||
install [options] <package>: Install a package
|
install [options] <package>: Install a package
|
||||||
Options:
|
Options:
|
||||||
|
|
Loading…
Reference in a new issue