aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-05-19 15:23:18 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-19 15:27:54 (GMT)
commitc5b598b81db43a5fd74bbfa7577d5ef9f23a9842 (patch)
tree693113ffd4505479761ea47a800f0c4c1c9c184a
parent4da6816e63eeb5e7076a7543bc3eae0b681caf69 (diff)
check_needs.pl: Improve script to point to all issues at once
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rwxr-xr-xcheck_needs.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/check_needs.pl b/check_needs.pl
index 9eba196..8ced4f3 100755
--- a/check_needs.pl
+++ b/check_needs.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
+my $need = 0;
sub findprog($)
{
foreach(split(/:/, $ENV{PATH})) {
@@ -13,11 +14,11 @@ sub need_program
my $pkgname = shift;
return if findprog($prog);
- print "please install \"$prog\", otherwise, build won't work.";
+ print "ERROR: please install \"$prog\", otherwise, build won't work.";
print " This program is generally found at \"$pkgname\" package." if ($pkgname);
print "\n";
- die "need $prog";
+ $need++;
}
need_program "git";
@@ -25,3 +26,6 @@ need_program "make";
need_program "gcc";
need_program "patch";
need_program "lsdiff", "patchutils";
+
+die "Build can't procceed as $need dependency is missing" if ($need == 1);
+die "Build can't procceed as $need dependencies are missing" if ($need);

Privacy Policy