| | |
| | | '^/usr/lib/locale/', # ignore locale support |
| | | '^/usr/share/lib/make/', # ignore make bits |
| | | '^/usr/share/lib/zoneinfo/', # ignore timezone info |
| | | '/SUNWspro/', # ignore compiler bits |
| | | '/sunstudio12.1/', # ignore more compiler bits |
| | | '^/ws/', # nothing in /ws can be interesting |
| | | '^\.[/\.]{0,1}$' # ignore ., .., and ./ |
| | | ); |
| | |
| | | # Main execution begins here |
| | | # |
| | | GetOptions("c|command=s" => \$cmd, "i|input-file=s" => \@file, |
| | | "v|verbose" => \$verbose); |
| | | "p|pkg" => \$pkg_flag, "v|verbose" => \$verbose); |
| | | |
| | | if (defined($cmd)) { |
| | | $file = (tempfile(UNLINK => 1))[1]; |
| | |
| | | ($verbose == 1) && printf("*** Processing results...\n"); |
| | | my ($tools, $files) = process_dtrace_results($file); |
| | | |
| | | ($verbose == 1) && printf("*** Generating package requirements...\n"); |
| | | my ($pkgs) = generate_package_requirements($tools, $files); |
| | | if (defined($pkg_flag)) { |
| | | ($verbose == 1) && printf("*** Generating package requirements...\n"); |
| | | my ($pkgs) = generate_package_requirements($tools, $files); |
| | | } |
| | | |
| | | if (defined($tools)) { |
| | | print "TOOL: $_\n" for (sort keys %$tools); |
| | | print "\n"; |
| | | print "REQUIRED_TOOL +=\t$_\n" for (sort keys %$tools); |
| | | } |
| | | |
| | | if (defined($files)) { |
| | | print "FILE: $_\n" for (sort keys %$files); |
| | | print "\n"; |
| | | print "REQUIRED_FILE +=\t$_\n" for (sort keys %$files); |
| | | } |
| | | |
| | | if (defined($pkgs)) { |
| | | @unique{values %$pkgs} = (); |
| | | print "PKG: $_\n" for (sort keys %unique); |
| | | print "\n"; |
| | | print "REQUIRED_PKG +=\t$_\n" for (sort keys %unique); |
| | | } |
| | | |
| | | exit(0); |