in reply to Finding directory paths for missing objs
Update: replaced if ($dir) with foreach ($dir)#!/usr/bin/perl use strict; use warnings; use File::Util; use File::Spec; my @dirs = shift @ARGV; my($f) = File::Util->new(); (@dirs) = $f->list_dir( @dirs, '--dirs-only', '--no-fsdots', '--with-paths'); foreach my $dir(@dirs) { foreach ($dir) { my (@ext) = ('*.so', '*.o', '*.a'); my $path = File::Spec->catfile($dir, "*.@ext") . "\n"; if (not glob($path)) { print "No @ext in $dir\n"; } else { print "OK\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding directory paths for missing objs
by Anonymous Monk on Mar 13, 2011 at 06:17 UTC |