scripts/feeds: remove useless install_method abstraction
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44778
This commit is contained in:
parent
b6ac0d799c
commit
0efcb02c9d
@ -347,7 +347,7 @@ sub list {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub install_generic() {
|
sub do_install_package($$) {
|
||||||
my $feed = shift;
|
my $feed = shift;
|
||||||
my $pkg = shift;
|
my $pkg = shift;
|
||||||
my $path = $pkg->{makefile};
|
my $path = $pkg->{makefile};
|
||||||
@ -366,17 +366,6 @@ sub install_generic() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
my %install_method = (
|
|
||||||
'src-svn' => \&install_generic,
|
|
||||||
'src-cpy' => \&install_generic,
|
|
||||||
'src-link' => \&install_generic,
|
|
||||||
'src-git' => \&install_generic,
|
|
||||||
'src-gitsvn' => \&install_generic,
|
|
||||||
'src-bzr' => \&install_generic,
|
|
||||||
'src-hg' => \&install_generic,
|
|
||||||
'src-darcs' => \&install_generic,
|
|
||||||
);
|
|
||||||
|
|
||||||
my %feed;
|
my %feed;
|
||||||
|
|
||||||
sub lookup_package($$) {
|
sub lookup_package($$) {
|
||||||
@ -449,12 +438,7 @@ sub install_package {
|
|||||||
and warn "Overriding package '$src'\n"
|
and warn "Overriding package '$src'\n"
|
||||||
or warn "Installing package '$src'\n";
|
or warn "Installing package '$src'\n";
|
||||||
|
|
||||||
$install_method{$type} or do {
|
do_install_package($feed, $pkg) == 0 or do {
|
||||||
warn "Unknown installation method: '$type'\n";
|
|
||||||
return 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
&{$install_method{$type}}($feed, $pkg) == 0 or do {
|
|
||||||
warn "failed.\n";
|
warn "failed.\n";
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user