Commit e0dd826b authored by Morten Welinder's avatar Morten Welinder

New tool.

parent db2d2fa5
2001-05-04 Morten Welinder <terra@diku.dk>
* check-glade-visible: New tool.
2001-03-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.64
......
......@@ -64,7 +64,7 @@ if (@files) {
local (*CVS);
open (*CVS, "cvs log -h -N '" . join ("' '", @files) . "' 2>/dev/null |")
or die "$0: cannot execute find: $!\n";
or die "$0: cannot execute cvs: $!\n";
while (<CVS>) {
chomp;
if (/^Working file: (.+)$/i) {
......
#!/usr/bin/perl -w
#
# Gnumeric
#
# Copyright (C) 2001 Morten Welinder.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this library; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Author: Morten Welinder <terra@diku.dk>
use strict;
my $exitcode = 0;
die "$0: must be run from top-level directory.\n"
unless -r "configure.in" && -r 'ChangeLog';
my %exceptions =
(
);
my @files;
{
local (*FIND);
open (*FIND, "find . '(' -name \*.glade -type f -print ')' -o '(' -type d '(' -name CVS -o -name intl -o -name macros ')' -prune ')' |")
or die "$0: cannot execute find: $!\n";
foreach my $filename (<FIND>) {
chomp $filename;
$filename =~ s|^\./||;
next if $exceptions{$filename};
push @files, $filename;
}
close (*FIND);
}
FILE:
foreach my $filename (@files) {
local (*GREP);
open (*GREP, "grep -c '<visible>False</visible>' '$filename' /dev/null 2>/dev/null |")
or die "$0: cannot execute grep: $!\n";
while (<GREP>) {
chomp;
last if m|^/dev/null:|;
if (/:0$/) {
print STDERR "File `$filename' does not set the visible attribute.\n";
$exitcode = 1;
next FILE;
}
}
close (*GREP);
}
exit $exitcode;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment