Simplify search, there's only one binary now
authorRicardo Mones <ricardo@mones.org>
Mon, 22 Aug 2016 22:36:02 +0000 (00:36 +0200)
committerRicardo Mones <ricardo@mones.org>
Mon, 22 Aug 2016 22:36:02 +0000 (00:36 +0200)
clawsker

index df27134..e3bee7d 100755 (executable)
--- a/clawsker
+++ b/clawsker
@@ -253,16 +253,10 @@ sub version_greater_or_equal {
 }
 
 sub get_claws_version {
-    my @cmbin = (
-        'claws-mail',
-    );
-    my $res = "";
-    foreach my $bin (@cmbin) {
-        $_ = qx/which $bin/;
-        chomp;
-        last if ($_ ne "");
-    }
+    $_ = qx/which claws-mail/;
+    chomp;
     return "" unless ($_); # not installed
+    my $res = "";
     $_ = qx/$_ -v/;
     chomp;
     my @fver = split (/ /);