various Gopher-related utils
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/sh
|
|
|
|
##
|
|
## validate a gophermap -- just pipe in the file
|
|
##
|
|
## (c) 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org>
|
|
##
|
|
|
|
[ -z "$(cat ${1:-/dev/stdin} | sed -n -E -e '/(^[0-9+gIThis].* .* .* |^\.\r$)/! =' \
|
|
| tr '\n' ' ' | tee /dev/stderr )" ] && exit 0
|
|
echo && exit 1
|
|
|