mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
detect whitespace issues in rfc/index.txt earlier
by checking with each fetch and update.
This commit is contained in:
11
rfc/fetch.sh
11
rfc/fetch.sh
@ -1,4 +1,13 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
set -uo pipefail
|
||||
|
||||
if grep ' ' index.txt | grep -E -v '^[^ ]+ [^ ]+ [^ ]+ [^ ]+$$'; then
|
||||
echo 'bad lines in rfc/index.txt'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
for number in $(sed -n 's/^\([0-9][0-9]*\)[ \t].*$/\1/p' index.txt); do
|
||||
if ! test -f "$number"; then
|
||||
curl https://www.rfc-editor.org/rfc/rfc$number.txt >$number || rm $number
|
||||
|
Reference in New Issue
Block a user