annotate src/pkg-examine.pl @ 27:738745bfa17b

remove broken files.
author Robert McIntyre <rlm@mit.edu>
date Thu, 10 Jan 2013 15:21:57 +0000
parents d956ace7380e
children dd480255bd82
rev   line source
rlm@25 1 #!/usr/bin/perl
rlm@25 2
rlm@25 3
rlm@25 4 if ($ARGV[0] eq "--help"){
rlm@25 5 print <<"HERE";
rlm@25 6
rlm@25 7 pkg-examine -- print package contents.
rlm@25 8
rlm@25 9 Written by Robert McIntyre. This software is free
rlm@25 10 software and is released to the public domain.
rlm@25 11
rlm@25 12 HERE
rlm@25 13 exit 0;
rlm@25 14 }
rlm@25 15
rlm@25 16
rlm@25 17
rlm@25 18 $" = " ";
rlm@25 19 $pkg_name = $ARGV[0];
rlm@25 20
rlm@25 21 `id -g $pkg_name 2>/dev/null`;
rlm@25 22 if ($?){
rlm@25 23 print "No group named $pkg_name.";
rlm@25 24 exit 0;}
rlm@25 25
rlm@25 26 @files = split(/\0/, `find /usr /opt /etc -group $pkg_name -print0`);
rlm@25 27
rlm@25 28 print "@files\n";