Commit Diff


commit - a452e7cd2bce8eac5962ccc9e44bad6f9f42f092
commit + 10382cde87b5f884c6944e00bf4e2a71804f08cd
blob - 26af97b46ae0b54fa6d29ea7af9295f30683aa7d
blob + cfdb33ddbb45d3338d840aa96edd139cd764a073
--- .gitignore
+++ .gitignore
@@ -31,5 +31,5 @@ kamiftp/kamiftp
 kamirepl/kamirepl
 ninepscript/ninepscript
 
-site/*.[1-9].html
-site/*.[1-9].txt
+site/gemini
+site/www
blob - dc961427cc26b06dc4aaaff090fc0b75fc354132
blob + f6e544b1666f432f7b3d04c571c73a2de208f75d
--- site/index.gmi
+++ site/index.gmi
@@ -4,7 +4,7 @@ kamid is a FREE, easy-to-use and portable implementati
 
 ### Documentation
 
-=> 9p.7.html		9p.7: protocol documentation
-=> kamictl.8.html	kamictl.8: command line utility to manage the daemon
-=> kamid.8.html		kamid.8: daemon documentation
-=> kamiftp.1.html	kamiftp.1: ftp(1)-like command line utility
+=> 9p.7.MANEXT		9p.7: protocol documentation
+=> kamictl.8.MANEXT	kamictl.8: command line utility to manage the daemon
+=> kamid.8.MANEXT	kamid.8: daemon documentation
+=> kamiftp.1.MANEXT	kamiftp.1: ftp(1)-like command line utility
blob - /dev/null
blob + 32f18427937fbc5afe2b8ec4fe3e792302b00bf6 (mode 755)
--- /dev/null
+++ site/subst
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Copyright (c) 2022 Omar Polo <op@omarpolo.com>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# subst -- filter that replaces key=values pairs
+#
+# usage: subst key1=val1 [... keyn=valn] [files...]
+#
+# Use `--' before the first file if it may contain an = in its name.
+# If no files are given, read and substitute from standard input.
+
+args=''
+
+for arg; do
+	if [ "$arg" = '--' ]; then
+		break
+	fi
+
+	key="$(printf '%s\n' $arg | cut -s -d '=' -f1)"
+	if [ -z "$key" ]; then
+		break
+	fi
+	val="$(printf '%s\n' $arg | cut -d '=' -f 2-)"
+	shift
+
+	args="$args -e s/$key/$val/g "
+done
+
+exec sed $args "$@"