=================================================================== RCS file: /cvs/openbsd/fill_chroot/find_depends,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- openbsd/fill_chroot/find_depends 2005/12/21 18:16:03 1.2 +++ openbsd/fill_chroot/find_depends 2005/12/21 18:22:32 1.3 @@ -1,15 +1,27 @@ #!/usr/bin/perl -# $RedRiver: find_depends,v 1.1 2005/12/21 18:04:06 andrew Exp $ +# $RedRiver: find_depends,v 1.2 2005/12/21 18:16:03 andrew Exp $ use strict; use warnings; -# find /home/andrew/www/ -name *.so* | xargs find_depends | sort -u | xargs -I {} cp {} /home/andrew/www{} +# find /home/andrew/www/ -name *.so* | xargs find_depends \ +# | sort -u | xargs -I {} cp {} /home/andrew/www{} -die unless @ARGV; +my @Files; +my %opts; +foreach (@ARGV) { + if (/^-(\w+)$/) { + $opts{$1} = 1; + } else { + push @Files, $_; + } +} + +die unless @Files; + my %libs; -foreach my $file (@ARGV) { +foreach my $file (@Files) { my $l = find_libs($file); foreach (keys %{ $l }) { @@ -29,7 +41,7 @@ my $ld = shift || get_ldconfig(); my $locs = shift || {}; - print STDERR "Finding libs for '$file'\n"; + print STDERR "Finding libs for '$file'\n" unless $opts{q}; my @libs = search_file($file); foreach (@libs) {