diff --git a/scripts/prt-auf b/scripts/prt-auf index 0fdcede..e26a027 100755 --- a/scripts/prt-auf +++ b/scripts/prt-auf @@ -51,7 +51,7 @@ if ($action =~ /^(diff|quickdiff|listlocked|depends|deptree|remove|install|updat ############## Branch based on the requested action ################# -if ($action eq "path") { @results = find_port_by_name(@query,1,1,0); +if ($action eq "path") { @results = find_port_by_name($query[0],1,1,0); } elsif ($action eq "search") { @results = find_port_by_name(@query,0,$osearch{path},1); } elsif ($action eq "fsearch") { $hh = find_port_by_file(".footprint", @query); } elsif ($action eq "dsearch") { @results = find_port_by_desc(@query); @@ -89,9 +89,8 @@ if (($action =~ /^(listinst|listorphans)/) printf "$strf", $result; } } elsif ($action =~ /^(list|search|dsearch|path|dependent)/) { - exit 1 if ($#results < 0); foreach my $result (@results) { - chomp $result; next if ($result =~ /^\s*$/); + next if ((! $result) or ($result =~ /^\s*$/)); $result =~ s/.*\/(.*)$/$1/ if (($action ne "path") and ($osearch{path}==0)); $result .= " $V_REPO{$result}" if (($osearch{verbose}==1) and ($action ne "path")); $result .= " $V_REPO{$result}\n$DESC{$result}\n" if (($osearch{verbose}>1) and ($action ne "path"));