Initial gopher validator commit. - gopher-validator - Simple gopher menu validator.
(HTM) git clone git://bitreich.org/gopher-validator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-validator
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit 152b7ffd60ace3f18a6cfd667432437c4e6aa69c
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Wed, 18 Jul 2018 23:21:41 +0200
Initial gopher validator commit.
Diffstat:
A gopher-validator | 9 +++++++++
1 file changed, 9 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/gopher-validator b/gopher-validator
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+result="$(sacc "$@" | grep "^!")"
+
+[ -z "$result" ] && printf "valid\n" && exit 0
+
+printf "invalid\n"
+exit 1
+