#!/bin/ksh # # Copyright 2018 Staysail Systems, Inc. # Copyright 2018 Capitar IT Group BV # This software is supplied under the terms of the MIT License, a # copy of which should be located in the distribution where this # file was obtained (LICENSE.txt). A copy of the license may also be # found online at https://opensource.org/licenses/MIT. # # This script is used to preview in HTML or man format, the documentation. # I use it during development, YMMV. It is probably completely useless # on Windows. MANSOURCE="NNG" MANMANUAL="NNG Reference Manual" case $(uname -s) in Darwin) OPEN=open MAN=man ;; Linux) OPEN=xdg-open MAN=man ;; *) echo "No idea how to preview on this system." exit 2 esac if [ -n "$DISPLAY" ] then style=html else style=man fi while getopts cs: arg do case "${arg}" in c) cleanup=yes;; s) style=$OPTARG;; ?) echo "Usage: $0 [-s