summaryrefslogtreecommitdiff
path: root/goval
blob: 01e322cfa50f07c363e85d137855e57e1ead3019 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/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