Annotation of dssp/build.sh, revision 1.1

1.1     ! snw         1: #!/usr/bin/env bash
        !             2: 
        !             3: VER="@(#)build.sh      1.6"
        !             4: 
        !             5: echo "DSSP Builder    ${VER}"
        !             6: echo " Copyright (C) 2019 ChivaNet Internet Services"
        !             7: echo ""
        !             8: 
        !             9: STD="001:Essential Philosophy Document,"
        !            10: STD="${STD}002:Naming Conventions and Labeling,"
        !            11: STD="${STD}003:Auditing and Security Procedures,"
        !            12: STD="${STD}004:Account Management Procedures,"
        !            13: STD="${STD}005:Address Allocation Policies,"
        !            14: STD="${STD}006:Host Deployment Procedures,"
        !            15: STD="${STD}007:Backup Procedures and Retention Policy,"
        !            16: STD="${STD}008:Interconnection and VPN Policy and Procedures,"
        !            17: STD="${STD}009:Physical Plant Minimum Standards,"
        !            18: STD="${STD}010:Base Services Minimum Standards,"
        !            19: STD="${STD}011:GDPR Compliance Policy and Procedures,"
        !            20: STD="${STD}012:Terms of Service,"
        !            21: STD="${STD}013:Privacy Policy,"
        !            22: STD="${STD}014:Software Development Standards,"
        !            23: STD="${STD}015:Cable Management Minimum Standards,"
        !            24: STD="${STD}016:Monitoring Procedures"
        !            25: 
        !            26: echo "<TABLE BORDER=2 CELLPADDING=8>" > list.shtml 
        !            27: echo "<TR>" >> list.shtml
        !            28: echo "<TH>No</TH>" >> list.shtml
        !            29: echo "<TH>Rev</TH>" >> list.shtml
        !            30: echo "<TH>Title</TH>" >> list.shtml
        !            31: echo "<TH>View</TH>" >> list.shtml
        !            32: echo "</TR>" >> list.shtml
        !            33: 
        !            34: IFS=","
        !            35: for S in ${STD}
        !            36: do
        !            37:     echo -n "Processing ${S}:  "
        !            38:     SNO=$(echo $S | cut -d: -f1)
        !            39:     ST=$(echo $S | cut -d: -f2)
        !            40:     SRC="dssp-${SNO}.ms"
        !            41:     PS="dssp-${SNO}.ps"
        !            42:     TXT="dssp-${SNO}.txt"
        !            43:     PDF="dssp-${SNO}.pdf"
        !            44:     
        !            45:     echo "<TR>" >> list.shtml
        !            46:     echo "<TD>DSSP-${SNO}</TD>" >> list.shtml
        !            47: 
        !            48:     if [[ -f $SRC ]]
        !            49:     then
        !            50:        echo "[source exists]"
        !            51:        REV=$(what $SRC | tail -1 | awk '{ print $NF }')
        !            52: 
        !            53:        cat $SRC | troff -ms | dpost > $PS
        !            54:        cat $SRC | nroff -ms | col -b > $TXT
        !            55:        
        !            56:        echo "<TD>${REV}</TD>" >> list.shtml
        !            57:        echo "<TD>${ST}</TD>" >> list.shtml
        !            58:        echo "<TD><A HREF=standards/${PS}>PostScript</A> <A HREF=standards/${TXT}>Text</A> <A HREF=standards/${PDF}>PDF</A></TD>" >> list.shtml
        !            59:     else
        !            60:        echo "[source does not exist]"
        !            61:        echo "<TD>-</TD>" >> list.shtml
        !            62:        echo "<TD>${ST}</TD>" >> list.shtml
        !            63:        echo "<TD>-</TD>" >> list.shtml
        !            64:     fi
        !            65: 
        !            66:     echo "</TR>" >> list.shtml
        !            67: 
        !            68:     
        !            69: done
        !            70: 
        !            71: echo "</TABLE>" >> list.shtml
        !            72: 
        !            73: echo "Done."

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