summaryrefslogtreecommitdiff
path: root/textproc/rfcutil/patches/patch-aa
blob: 1719d8f9fd0c0b30aeb81ebe9acbf5c75d767643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$NetBSD: patch-aa,v 1.3 2011/11/23 13:31:58 hubertf Exp $

--- rfc.orig	2011-11-23 13:08:42.000000000 +0000
+++ rfc
@@ -106,6 +106,9 @@ if ($ARGV[0] eq "-i") {
     #system ("$viewer -source http://www.faqs.org/rfc/rfc-index.txt > $indexpath");
     #system ("$viewer -source http://www.dewn.com/rfc/rfc-index.txt > $indexpath");
     system ("$viewer -source http://www.ietf.org/download/rfc-index.txt > $indexpath");
+
+    my $filetype = `file '$indexpath'`;
+    system("if expr \"$filetype\" : \".*gzip.*\" 2>&1 >/dev/null ; then mv ${indexpath} ${indexpath}.gz ; gunzip ${indexpath}.gz ; fi");
     $indexlength=numlines($indexpath); print "new lines \t= $indexlength\t$indexpath\n";
     exit }