Update of /cvsroot/fink/experimental/thesin/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv29698
Added Files:
validate
Log Message:
works for now, I use crontlog to upout it to a log and email it to myself is the log
has content for now
--- NEW FILE: validate ---
#!/usr/bin/perl
use warnings;
use strict;
#### Config
my $sandbox="~/sinfink/finkinfo"; # location of info file workdir
my @excludelist=("test"); # exclude dirs above $sandbox
my $useemail=1; # email reports
my $email=""; # email address "" eq email in info file
my $mailprog="mail"; # program and switches to send mail
my $emaileach=0; # send in one email or per error
my $quiet=1; # enable quiet mode
#### END Config
my ($filename, $exclude, $line, $match, @list, $errors);
my @filelist=`find $sandbox -name \*.info`;
# get infofile list minus exclude dirs
foreach $filename (@filelist) {
$match=0;
chomp($filename);
foreach $exclude (@excludelist) {
if ($filename =~ /^.*\/$exclude\/.*$/) {
$match=1;
}
}
unless ($match) {
push(@list, $filename);
}
}
print "\n";
# run validate
foreach $filename (@list) {
if ($filename =~ /^.*\/(.*)\/(.*\.info)$/) {
my $file = $2;
my $path = $1;
my $cmd = "fink check $filename";
unless ($quiet) {
print "Checking $file in $path...";
}
open(IN,"$cmd 2>&1 |") or die "Couldn't validate $filename: $!\n";
$line = <IN>;
if ($line) {
chomp($line);
$errors .= "$filename\n";
$errors .= " $line\n";
unless ($quiet) {
print "FAILED\n";
print " $line\n";
}
} else {
unless ($quiet) {
print "OK\n";
}
}
close(IN);
}
}
# print error list
if ($errors) {
print "$errors\n";
}
exit 0;
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits