mirror of https://bitbucket.org/anguist/ntpa
40 lines
722 B
Bash
Executable File
40 lines
722 B
Bash
Executable File
#! /bin/sh
|
|
|
|
# Taken from the tz distribution. Used to create the README file.
|
|
|
|
# This file is in the public domain, so clarified as of
|
|
# 2009-05-17 by Arthur David Olson.
|
|
|
|
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
|
|
GROFF_NO_SGR=1
|
|
export GROFF_NO_SGR
|
|
|
|
# Tell groff to emit SGR escape sequences (ANSI color escapes).
|
|
#GROFF_SGR=1
|
|
#export GROFF_SGR
|
|
|
|
echo ".am TH
|
|
.hy 0
|
|
.na
|
|
..
|
|
.rm }H
|
|
.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
|
|
binmode STDIN, '\'':encoding(utf8)'\'';
|
|
binmode STDOUT, '\'':encoding(utf8)'\'';
|
|
chomp;
|
|
s/.\010//g;
|
|
s/\s*$//;
|
|
if (/^$/) {
|
|
$sawblank = 1;
|
|
next;
|
|
} else {
|
|
if ($sawblank && $didprint) {
|
|
print "\n";
|
|
$sawblank = 0;
|
|
}
|
|
print "$_\n";
|
|
$didprint = 1;
|
|
}
|
|
'
|
|
|