treewide: drop use of which
[openwrt/staging/jow.git] / scripts / download.pl
index 8e6463c007615e42f826f3f75d68ec8a039e4d19..ebb0d7af199fa14abf72f75a2e8ae31cec030e77 100755 (executable)
@@ -54,10 +54,8 @@ sub localmirrors {
 
 sub which($) {
        my $prog = shift;
-       my $res = `which $prog`;
+       my $res = `command -v $prog`;
        $res or return undef;
-       $res =~ /^no / and return undef;
-       $res =~ /not found/ and return undef;
        return $res;
 }