File:  [Coherent Logic Development] / dssp / build.sh
Revision 1.1: download - view: text, annotated - select for diffs
Mon Apr 21 22:21:30 2025 UTC (6 weeks ago) by snw
Branches: MAIN
CVS tags: HEAD
Add build.sh

#!/usr/bin/env bash

VER="@(#)build.sh	1.6"

echo "DSSP Builder    ${VER}"
echo " Copyright (C) 2019 ChivaNet Internet Services"
echo ""

STD="001:Essential Philosophy Document,"
STD="${STD}002:Naming Conventions and Labeling,"
STD="${STD}003:Auditing and Security Procedures,"
STD="${STD}004:Account Management Procedures,"
STD="${STD}005:Address Allocation Policies,"
STD="${STD}006:Host Deployment Procedures,"
STD="${STD}007:Backup Procedures and Retention Policy,"
STD="${STD}008:Interconnection and VPN Policy and Procedures,"
STD="${STD}009:Physical Plant Minimum Standards,"
STD="${STD}010:Base Services Minimum Standards,"
STD="${STD}011:GDPR Compliance Policy and Procedures,"
STD="${STD}012:Terms of Service,"
STD="${STD}013:Privacy Policy,"
STD="${STD}014:Software Development Standards,"
STD="${STD}015:Cable Management Minimum Standards,"
STD="${STD}016:Monitoring Procedures"

echo "<TABLE BORDER=2 CELLPADDING=8>" > list.shtml 
echo "<TR>" >> list.shtml
echo "<TH>No</TH>" >> list.shtml
echo "<TH>Rev</TH>" >> list.shtml
echo "<TH>Title</TH>" >> list.shtml
echo "<TH>View</TH>" >> list.shtml
echo "</TR>" >> list.shtml

IFS=","
for S in ${STD}
do
    echo -n "Processing ${S}:  "
    SNO=$(echo $S | cut -d: -f1)
    ST=$(echo $S | cut -d: -f2)
    SRC="dssp-${SNO}.ms"
    PS="dssp-${SNO}.ps"
    TXT="dssp-${SNO}.txt"
    PDF="dssp-${SNO}.pdf"
    
    echo "<TR>" >> list.shtml
    echo "<TD>DSSP-${SNO}</TD>" >> list.shtml

    if [[ -f $SRC ]]
    then
	echo "[source exists]"
	REV=$(what $SRC | tail -1 | awk '{ print $NF }')

	cat $SRC | troff -ms | dpost > $PS
	cat $SRC | nroff -ms | col -b > $TXT
	
	echo "<TD>${REV}</TD>" >> list.shtml
	echo "<TD>${ST}</TD>" >> list.shtml
	echo "<TD><A HREF=standards/${PS}>PostScript</A> <A HREF=standards/${TXT}>Text</A> <A HREF=standards/${PDF}>PDF</A></TD>" >> list.shtml
    else
	echo "[source does not exist]"
	echo "<TD>-</TD>" >> list.shtml
	echo "<TD>${ST}</TD>" >> list.shtml
	echo "<TD>-</TD>" >> list.shtml
    fi

    echo "</TR>" >> list.shtml

    
done

echo "</TABLE>" >> list.shtml

echo "Done."

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>