summaryrefslogtreecommitdiff
path: root/goval
blob: d1fcf6c982a6fd555f5b5c648b3e143546d75a48 (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].*\t.*\t.*\t|^\.\r$)/! =' \
	| tr '\n' ' ' | tee /dev/stderr )" ] && exit 0
echo && exit 1