- From: Terje Bless <link@hutz.w3.org>
- Date: Sun, 09 May 2004 15:56:57 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/misc In directory hutz:/tmp/cvs-serv15496/misc Added Files: mkrelease.sh spmpp.pl Log Message: Merging from branch validator-0_6_0-branch, at tag validator-0_6_5-release. --- NEW FILE: mkrelease.sh --- #!/bin/bash version="$1" if [ -z "$version" ] ; then echo "Usage: $0 <version>" exit 1 fi set -e tbversion=${version//./_} topdir=$(cd $(dirname $0)/.. ; pwd) tmpdir= trap cleanup EXIT cleanup() { set +e [ -z "$tmpdir" -o ! -d "$tmpdir" ] || rm -rf "$tmpdir" } tmpdir=$(mktemp -d /tmp/validator.XXXXXX) mkdir -p $tmpdir/validator-$version cp -pR $topdir/{htdocs,httpd,misc,README.cvs} $tmpdir/validator-$version cd $tmpdir find validator-$version -type d -name CVS | xargs -r rm -rf find validator-$version -name .cvsignore | xargs -r rm -rf rm -f validator-$version/misc/mkrelease.sh find . -type d | xargs -r chmod 755 find . -type f | xargs -r chmod 644 chmod 755 validator-$version/httpd/cgi-bin/check # sgml-lib tarball tar zc --owner=0 --group=0 -f $topdir/sgml-lib-$tbversion.tar.gz \ validator-$version/htdocs/sgml-lib # Validator tarball rm -rf validator-$version/htdocs/sgml-lib tar zc --owner=0 --group=0 -f $topdir/validator-$tbversion.tar.gz \ validator-$version --- NEW FILE: spmpp.pl --- #!/usr/bin/perl # # spmpp - Util scrip to generate a Config::General message catalog # for use in the Validator, from an OpenSP ParserMessages.rc. # (spmpp = "SP Message Pre-Processor") # # $Id: spmpp.pl,v 1.2 2004/05/09 15:56:55 link Exp $ # # # Require Perl 5.6.1 require 5.006_1; # # Keep myself from making stupid mistakes. use strict; use warnings; # # Array to keep messages in. my @msg; # # Snarf OpenSP's ParserMessages.rc and populate @msg. my $msgfile = $ARGV[0] || "/usr/local/validator/htdocs/config/verbosemsg.rc"; open FH, $msgfile or die "Can't open OpenSP ParserMessages file '$msgfile': $!"; while (<FH>) { next if /^\s*$/; my($id, $s) = split /, /, $_, 2; $id += 0; # Force numerical (kill leading space)... chomp $s; # Strip newline from end of message... push @msg, [$id, $s]; } close FH; print <<".EOF."; # # Automatically Generated by $0 # .EOF. # # For each message, spit out a Config::General config file snippet. # # The stuff in "verbose" needs to be a complete XHTML 1.0 Strict # block level element (e.g. a single DIV, or a DIV containing # multiple Ps; not multiple Ps without a container). The @class # and @id are used to play tricks with JavaScript in the final # output. "mid-n" identifies the class of message, "muid-n-n" # identifies the specific instance of that message (which is why # the last digit of the "muid" is replaced at runtime). # for (@msg) { print <<"_.EOF._"; <msg $_->[0]> original = $_->[1] verbose <<.EOF. <div class="ve mid-$_->[0]"> <p class="helpwanted"> <em>Help Wanted!</em> This message (#$_->[0]) has no explanation yet. If you can think of a succinct way to explain the possible situations that will trigger this error and how to fix it, please consider writing it down and sending it to the <a href="mailto:www-validator\@w3.org?Subject=[VE][$_->[0]]%20New%20Error%20Message%20Suggestion" >www-validator\@w3.org</a> list. </p> </div> .EOF. </msg> _.EOF._ } exit;
Received on Sunday, 9 May 2004 11:57:48 UTC