From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 17031 invoked from network); 10 Oct 2023 03:17:05 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 10 Oct 2023 03:17:05 -0000 Received: from pb-smtp2.pobox.com ([64.147.108.71]) by 9front; Mon Oct 9 23:15:42 -0400 2023 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id EFD8E1A4B07 for <9front@9front.org>; Mon, 9 Oct 2023 23:15:37 -0400 (EDT) (envelope-from unobe@cpan.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id :to:from:date:subject:mime-version:content-type :content-transfer-encoding; s=sasl; bh=+EMkUU3MZhWj4Sy091qFgHkO5 x0vZncEhxHDI2gOcXo=; b=BDpTAjz/BlFhiMK4+G+TZ3eGIV5BLeWaxWJitVsai Mym/Ij92WcQBjbg5a4RWLE2HHuV2X+QTag+ucUA0Ny2pCBDya0nKPzZ2cG/3LyhP AFKLtJOf64WwmbStd3M0f/bnjKxJaAe75WS0wJdeW9mof8Tc7kTLLNqXqSvo6KCD pE= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id E6FBF1A4B05 for <9front@9front.org>; Mon, 9 Oct 2023 23:15:37 -0400 (EDT) (envelope-from unobe@cpan.org) Received: from strider.localdomain (unknown [75.237.252.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id E73A51A4AF2 for <9front@9front.org>; Mon, 9 Oct 2023 23:15:36 -0400 (EDT) (envelope-from unobe@cpan.org) Message-ID: <160C282E7085F6F0166F1D36C4D81ABA@smtp.pobox.com> To: 9front@9front.org From: Romano Date: Tue, 10 Oct 2023 03:14:24 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 485A674C-671B-11EE-92CE-25B3960A682E-09620299!pb-smtp2.pobox.com List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: GPU-based firewall-scale standard browser Subject: [9front] [PATCH] grabrfc: update fetching Reply-To: 9front@9front.org Precedence: bulk The canonical server for fetching draft RFCs is defunct for ftp access, so a mirror site is now used. Add -d flag to fetch draft RFCs but otherwise do not. When fetching drafts, also fetch index and abstract files. For both normal and draft RFCs, only look for .txt files as there a lot of other files in remote directories that are not relevant. --- diff 01a98f25ecef2c291b67a92e39021a3173c59ce2 5e5cea4f135bd19a80ba949bcc72984fa9645721 --- a/lib/rfc/grabrfc +++ b/lib/rfc/grabrfc @@ -1,19 +1,27 @@ -#!/bin/rc -# grabrfc - copy new rfcs and drafts into /lib/rfc +#!/bin/rc -b +# grabrfc - copy new rfcs into /lib/rfc +# grabrfc -d - copy draft rfcs as well rfork en path=(/bin) fn cd +flagfmt='d:drafts' +eval `''{aux/getflags $*} || exec aux/usage + dom=`{ndb/query sys $sysname dom} if(~ $dom '') dom=$sysname -ramfs -ftpfs -q/ -a $user@$dom ftp.rfc-editor.org # was ftp.isi.edu +ftpfs -q/ -a $user@$dom ftp.rfc-editor.org found=no LIB=/lib/rfc cd /n/ftp/in-notes -for(i in rfc*){ +fn cprfc { + f=$1 + shift +} + +for(i in rfc*.txt){ target=`{ echo $i | sed ' s/.txt$// @@ -31,19 +39,42 @@ sed 's/^[0-9]/rfc&/' >$LIB/index unmount /n/ftp -ftpfs -q/ -a $user@$dom ftp.ietf.org +if (~ $drafts '') + exit +ftpfs -q/ -a $user@$dom ftp.math.utah.edu + # copy in new ones found=no LIB=/lib/rfc/drafts mkdir -p $LIB -cd /n/ftp/internet-drafts -for(i in *){ - target=$i +cd /n/ftp/pub/mirrors/ftp.ietf.org/internet-drafts +for(i in draft-*.txt){ + target=`{ + echo $i | sed ' + s/.txt$// + s/draft-//' + } if (test ! -e $LIB/$target && test -f $i && test `{ls -s $i | sed 's/ .*//'} -ge 2){ - cp $i $LIB/$target - chmod 664 $LIB/$target - echo drafts/$i + cp $i $LIB/$target + chmod 664 $LIB/$target + found=yes + echo drafts/$target } } +if (~ $found yes) { + if (test -f 1id-index.txt) + <1id-index.txt sed ' + s/\.txt// + s/draft-//' > $LIB/index + if not + >[1=2] echo no draft index found + if (test -f 1id-abstracts.txt) + <1id-abstracts.txt sed ' + s/\.txt// + s/draft-//' > $LIB/abstracts + if not + >[1=2] echo no abstracts found +} +unmount /n/ftp