From: Jonh Wendell <[email protected]> Currently the feeds script always exit with the status 0, even if it fails to update a feed. This patch changes this behaviour, returning 1 to the shell if any of the feeds fail to update.
This keeps the current behaviour, i.e., try to update all feeds even when one of them fails. Signed-off-by: Jonh Wendell <[email protected]> --- scripts/feeds | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index b1bdee5..c86cea4 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -539,6 +539,7 @@ sub update { my %opts; my $feed_name; my $perform_update=1; + my $result; $ENV{SCAN_COOKIE} = $$; $ENV{OPENWRT_VERBOSE} = 's'; @@ -563,7 +564,7 @@ sub update { if ( ($#ARGV == -1) or $opts{a}) { foreach my $feed (@feeds) { my ($type, $name, $src) = @$feed; - update_feed($type, $name, $src, $perform_update); + $result = 1 if update_feed($type, $name, $src, $perform_update); } } else { while ($feed_name = shift @ARGV) { @@ -572,14 +573,14 @@ sub update { if($feed_name ne $name) { next; } - update_feed($type, $name, $src, $perform_update); + $result = 1 if update_feed($type, $name, $src, $perform_update); } } } refresh_config(); - return 0; + return $result; } sub usage() { -- 1.7.10.4 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
