head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2000.11.22.02.35.42;	author kuriyama;	state dead;
branches;
next	1.3;

1.3
date	99.12.25.07.03.37;	author jkh;	state Exp;
branches;
next	1.2;

1.2
date	99.12.25.05.25.46;	author jkh;	state Exp;
branches;
next	1.1;

1.1
date	99.12.23.01.14.38;	author kuriyama;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Nuke revcheck script.  This script is obsoleted by prehtml.
@
text
@#!/usr/bin/perl -w
#
# The FreeBSD Japanese Documentation Project
#
# usage: revcheck <build topdir> <relative to localtop> <SGML filename>
#
# $FreeBSD: www/ja/revcheck,v 1.3 1999/12/25 07:03:37 jkh Exp $

my $buildtop = $ARGV[0];
my $reldir   = $ARGV[1];
my $name_ja  = $ARGV[2];
my $dir_en   = $buildtop . "/en/" . $reldir;
my $name_en  = $dir_en . "/" . $name_ja;
my $rev_en = 'English Revision Not found';
my $rev_ja = 'Japanese Revision Not found';
my $basename = $name_ja;

$basename =~ s/\.sgml//;

### File exist?
die "Cannot read local file: $!\n"
  unless -r $name_ja;
die "Cannot read English file: $!\n"
  unless -r $name_en;

### Open English file.
open EN, $name_en or die "Cannot open English file: $!\n";
while (<EN>) {
  if (m@@\044FreeBSD: (.+?) (.+?) .*$@@) {
    $rev_en = $2;
    last;
  }
}
close EN;

### Open Localized file.
open JA, $name_ja or die "Cannot open localized file: $!\n";
while (<JA>) {
  if (/Original [Rr]evision:[ \t]*([0-9.]+)/) {
    $rev_ja = $1;
    last;
  }
}
close JA;

#print ".if \${REV_NAME} == $name_ja\n";
# print ".if \${.IMPSRC} == $name_ja\n";
# print "LATEST_EN_REV=		$rev_en\n";
# print "CURRENT_BASE_REV=	$rev_ja\n";
# print ".endif\n";
print "<!ENTITY buildtop   '$buildtop'>\n";
print "<!ENTITY reldir     '$reldir'>\n";
print "<!ENTITY dir.en     '$dir_en'>\n";
print "<!ENTITY basename   '$basename'>\n";
print "<!ENTITY rev.base   '$rev_ja'>\n";
print "<!ENTITY rev.latest '$rev_en'>\n";
printf "<!ENTITY %% rev.diff '%s'>\n", ($rev_ja eq $rev_en) ? "IGNORE" : "INCLUDE";
@


1.3
log
@My previous commit was essentially a null-commit since cvs just turned
around and smashed the fix again, something I noticed immediately
thereafter.  The submitter heroically leaped forward with a fix after
I confessed insufficient ability with perl to make the match regexp work
correctly myself. :)

Submitted by:	Adruin "Adrian" Chadd <adrian@@freebsd.org>
@
text
@d7 1
a7 1
# $FreeBSD: www/ja/revcheck,v 1.2 1999/12/25 05:25:46 jkh Exp $
@


1.2
log
@Escape forward slashes in search pattern.
@
text
@d7 1
a7 1
# $FreeBSD: www/ja/revcheck,v 1.1 1999/12/23 01:14:38 kuriyama Exp $
d14 2
a15 2
my $rev_en;
my $rev_ja;
d29 2
a30 2
  if (/\$FreeBSD: www\/ja\/revcheck,v 1.1 1999\/12\/23 01:14:38 kuriyama Exp $/) {
    $rev_en = $1;
@


1.1
log
@Add "Synchronization Status" feature in Japanese web pages.

1. Add .sgml -> .revinc rule in web.mk.  This tells how to make SGML
   include file which contains revision information.

2. Add ja/revcheck script.  This script makes revision information
   from English SGML file and localized one.

3. Add *.revinc files into GENDOCS in localized Makefile.  This will
   generate *.revinc files from each *.sgml files.

4. Add %rev.diff entity into localized includes.sgml.

5. Add statement to include *.revinc for each *.sgml files.
   (this will be followed separately.)

Reviewed and not objected by:	Doc Team
@
text
@d7 1
a7 1
# $FreeBSD$
d29 1
a29 1
  if (/\$FreeBSD: .* (.*) .* .* .* .* \$/) {
@

