Author: nbd
Date: 2015-03-15 12:07:52 +0100 (Sun, 15 Mar 2015)
New Revision: 44778

Modified:
   trunk/scripts/feeds
Log:
scripts/feeds: remove useless install_method abstraction

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/scripts/feeds
===================================================================
--- trunk/scripts/feeds 2015-03-15 11:07:44 UTC (rev 44777)
+++ trunk/scripts/feeds 2015-03-15 11:07:52 UTC (rev 44778)
@@ -347,7 +347,7 @@
        return 0;
 }
 
-sub install_generic() {
+sub do_install_package($$) {
        my $feed = shift;
        my $pkg = shift;
        my $path = $pkg->{makefile};
@@ -366,17 +366,6 @@
        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;
 
 sub lookup_package($$) {
@@ -449,12 +438,7 @@
                and warn "Overriding package '$src'\n"
                or warn "Installing package '$src'\n";
 
-       $install_method{$type} or do {
-               warn "Unknown installation method: '$type'\n";
-               return 1;
-       };
-
-       &{$install_method{$type}}($feed, $pkg) == 0 or do {
+       do_install_package($feed, $pkg) == 0 or do {
                warn "failed.\n";
                return 1;
        };
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to