#!/bin/sh # # This is a shell archive. To extract its contents, # execute this file with /bin/sh to create the file(s): # # Category_header README mk_cat_html.sh mk_index.sh # Makefile Sample.config mk_config.sh mkls-lR.sh # Other_links chk_files.sh mk_filelist.sh mkls-ltR.sh # Page_footer chk_index.sh mk_html.sh synch_web_cmp.sh # Page_header mk_all_cat_html.sh # # This shell archive created: Thu Oct 17 13:39:29 EDT 2002 # echo "Extracting file README" sed -e 's/^X//' <<\SHAR_EOF > README XREADME X X XThis file describes the files used in configuring and maintaining the XInternational Informix Users Group (IIUG) Software Repository. X X XRepository Architecture X----------------------- X XThe IIUG Software Repository consists of two file storage areas, one Xaccessible by anonymous FTP, and the other within the IIUG Web page Xhierarchy. The two areas are called the FTP archive and Web archive Xrespectively in this documentation. X XIn general, each file in the Web archive also appears in the FTP archive. XThe Web version is kept in plain text so that it can be searched by the XWeb site search engine. The FTP version is usually gzipped or compressed. XFTP files such as binary executables that cannot be coverted to plain Xtext do not have Web counterparts. For these files, only links to the FTP Xfiles are listed in the Web indexes. X XThere are some FTP files that are not currently part of the Software XRepository. One such group consists of files in the older section of the XFTP archive dedicated to specific user groups. Also, there is a section Xof the FTP archive that holds articles posted to the combined informix-list Xand comp.datases.informix forum. These articles are also available on the XIIUG Web site, but there is no attempt to tie the two collections together. X X X XMaintaining the Repository X-------------------------- X XWhen a new Repository submission arrives, the file is added to the FTP Xarchive. If it is a new addition to the Repository, an entry is added Xto the Configuration File with the appropriate descriptive and file location Xinformation. Utility scripts are then run to synchronize the Web archive Xwith the FTP archive and update the Web and FTP index files. X X X XConfiguration Process X--------------------- X XThe file that describes the structure of the Repository is the Repository XConfiguration File. The Repository Administrator edits this file whenever Xa new entry is added to the Repository. This file isn't a complete Xconfiguration file in the true sense, because some parameters such as Xdirectory pathnames are set in a few of the utility shell scripts. X XThe script mk_index.sh reads the Configuration File and creates the XRepository Index Data File. That is probably a poor choice of terms since Xwe also deal with files named "index*.html", but it's just a working file Xthat is seldom handled directly anyway. We'll change it after the IPO. :-) X XThe Index Data File is a flat file that results from parsing the Configuration XFile. Most scripts use the Index Data File as input. X XAn exception to this is the script that synchronizes the Web and FTP Xdirectories, synch_web_cmp.sh. It uses the File List File built by Xmk_filelist.sh. The content of this file is essentially a correspondence Xtable that matches Web files with their FTP counterparts. The script Xchk_files.sh uses this file as well. X XThe Makefile handles most of the above processing. The Repository admin Xusually just edits the Configuration file, then executes the appropriate X"make" command. X X X XRepository Configuration File X----------------------------- X XPrior to the development of the current set of scripts and utilities that Xhelp maintain the Repository, that chore was accomplished more or less Xmanually. When a new submission arrived, it was placed in the FTP archive. XThen, a file containing a correspondence list of Web and FTP files was Xedited to add the entry. Then, the various Web page indexes were edited Xto add the Web and FTP links to the file(s) in the two archives. There Xwere other manual steps besides these. X XA new scheme was devised that uses the Repository Configuration File to Xdrive the whole process. Repository files must still be added or updated Xmanually in the FTP archive, but the rest of the process is fairly automated. X XAt the time that the Configuration file was envisioned, both the structure Xof the Web index pages and the method of tying together the Web and FTP Xcounterparts of each Repository file had evolved to a fairly stable state. X XThus, the Configuration file was designed to allow the Repository Manager Xto describe the way that Repository entries should appear in the Web index Xpages while providing enough configuration data so that the scripts could Xmaintain the structure of Web and FTP archives and keep them synchronized. X XListed below is a summary of valid Configuration File entries and the line Xtypes that are allowed with each. Rather than describe each entry type in Xgreat detail, I suggest you look at a sample Configuration file and use Xthis section as a reference to decipher each of the entries. X X XValid configuration file entries: X X File: Used for normal single file entry X X Desc: Description X Web: Web file name or URL - link text is "View" X FTP: FTP companion file or URL of "View" Web file X Info: Web file name or URL - link text is "Info" X IFTP: FTP companion file or URL of Info Web file X Cat: File category keywords X Src: Source language keywords X X X Group: Used for a multi-part/file group X X FTP: FTP directory/file or URL for group X Desc: Description X Cat: Group category keywords X Src: Source language keywords X X Part: Part name X X Desc: Description X Web: Web file name or URL - link text is "View" X FTP: FTP companion file or URL of "View" Web file X Info: Web file name or URL - link text is "Info" X IFTP: FTP companion file or URL of Info Web file X Cat: Part category keywords X Src: Source language keywords X X X Link: Used for a link to another site or page X X URL: URL of site or page X Desc: Description X Cat: Link category keywords X Src: Source language keywords X Src: Source language keywords X X X Hide: Used for a Web and/or FTP file that should not appear X in the Web index X X Web: Web file name or URL X FTP: FTP file name or URL X X X o Multiple "Desc:" description lines are legal for each entry type where X they are allowed: File, Group, Part and Link. X X File, Part and Link descriptions should be fairly short and optimumly X fit on a single line of the Web index page. Multiple Desc: lines for X a File, Part or Link entry will be automatically concatenated into a X single Desc: value. X X The description for an entire Group may be placed on as many Desc: X lines as needed. They will be reproduced as entered on the Web index X page, but no HTML formatting will be added automatically. HTML tags may X be embedded in the description lines to control their display on the Web X index page. X X X o The valid Category and Source keywords must be defined at the front of X the configuration file before any file or group entries. Use special X "Cat:" and "Src:" lines to do this. The formats of such lines are: X X Cat: keyword category_description X X Src: keyword source_language_or_tool_description X X X o Some entries will not have applicable Source or Category keywords. X In such cases, a special keyword of "NONE" may be used for the Source X and/or the Category to explicitly indicate this and to prevent warning X messages. This keyword will not be displayed on any of the index X pages. You may not define your own "NONE" keyword. X X X XOther configuration and control entries: X X WEB_HOST Sets Web archive host name. X X WEB_DIR Sets Web archive base directory. X X GROUP_WEB_HOST Sets separate Web archive host that overrides WEB_HOST X within groups. The value of GROUP_WEB_HOST persists from X one group to the next unless changed. X X GROUP_WEB_DIR Sets separate Web archive base directory that overrides X WEB_DIR within groups. The value of GROUP_WEB_DIR X persists from one group to the next unless changed. X X FTP_HOST Similar parameters as above, except that these are for X FTP_DIR FTP references. X GROUP_FTP_HOST X GROUP_FTP_DIR X X X o The WEB_HOST and WEB_DIR parameters are used in conjunction with the X Web: file listed for each entry to build the full Web URL for the file. X Likewise, the FTP_HOST and FTP_DIR are use to build FTP URLs. X X If the Web: file starts with the protocol indicator "http:", the file X entry is used by itself for the URL. Otherwise, a URL is built that X consists of a host part followed by pathname part. X X If a *_HOST parameter has been specified, the appropriate protocol X "http://" or "ftp://" is prepended to it. If WEB_HOST is not set, X URLs will reference the host Web site. FTP_HOST should be set to X something, usually "ftp.iiug.org". X X When the pathname part is built, if the file starts with a "/", it is X used by itself. Otherwise, it is concatenated with the the *_DIR X parameter. A "/" is added between the two if necessary. X X To finish building the URL, the host and pathname parts are concatenated, X with a "/" being added between them if necessary. X X The same construction method is used for FTP URLs. X X X o GROUP_WEB_* and GROUP_FTP_* parameters are also available for use within X groups. These are basically convenience features that allow a different X host or base directory to be specified for a group. X X If any GROUP_* value is set, it will override its global counterpart when X a Web or FTP URL is constructed within a group. The GROUP_* parameters X have no effect outside of groups. X X An easy way to add a new group with a different host and/or directory X to an existing configuration file is to "wrap" the group specification X in appropriate GROUP* lines. X X For example: X X GROUP_WEB_HOST: www.somehost.com X GROUP_WEB_DIR: /that/host/software/directory X X Group: new_group X X X GROUP_WEB_HOST: X GROUP_WEB_DIR: X X The last two lines are needed since the settings of GROUP_WEB_HOST and X GROUP_WEB_DIR will continue be used in subsequent groups until they are X reset. With the GROUP_WEB_* parameters reset, host and directory values X will be obtained from the WEB_* parameters in subsequent groups as they X were before the new group was added. X X If you do set any GROUP_* parameters for a group, it's good practice to X reset them immediately after the group even if you must immediately set X them again for the next group. This will insure that the next group will X retain the correct GROUP_* setting(s) if a new group is inserted between X the two at a later date. X X XPossible future line types: X X DATE: Date added or last updated X MAIL: E-mail address of author or information contact X INFO: E-mail address of author or information contact X NOTE: Note or comment line X AUTHOR: Author or other attribution X REQ: Other Repository file required by this entry X X X XRepository Index Data File X-------------------------- X XRecord Types: X X C Category keyword definition X S Source keyword definition X F Individual File entry X G Group header entry X GD Group description line entry X P Group Part entry X L Link entry X H Hidden file entry X X X XFile List File X-------------- X XThe File List File contains the list of Repository files that should Xappear in the Web directory and their companion files that are stored Xin the IIUG FTP archive. It is a working file built from the Repository XIndex Data File by mk_filelist.sh and is usually not edited directly. X XFiles in the Web directory that are meant to be viewable from the Web Xshould be in plain ASCII. Their companion FTP files may be identical Xcopies of the files, or compressed or gzipped versions. X XThe file list consists of two columns of file names. This file is read Xby awk, so blanks or tabs may be used to separate columns. Lines Xbeginning with "#" and blank lines are considered comments, though Xtypically there should be none since the file is script-generated. X XA normal file entry is a line that contains the file's Web and FTP Xarchive pathnames. The Web file should appear in column 1, with its Xcompanion FTP file appearing in column 2. X XThe Web file name should be as it appears in the Web directory, and should Xhave a name that will cause a Web browser to treat it as an ASCII text file. XThis generally means a name with no dot suffix, or a suffix that will not Xtrigger special browser actions such as ".zip", ".exe", etc. X XIf the FTP file name ends in ".Z" or ".gz", the Repository maintenance Xutilities will assume it to be a compressed or gzipped version of the Web Xfile and convert the file automatically as needed. X XKeywords may be present that indicate special handling for certain files Xas described in the following table: X XCol Keyword Meaning X--- ------- ---------------------------------------------------------- X X 1 NOWEB An FTP file that has no Web archive counterpart and thus X should not appear in the Web directory, such as certain X INDEX and README files, and any file that is not ASCII X (possibly compressed) such as image files and executables. X X 2 NOFTP A Web file that is maintained manually or by utility X scripts, and has no companion FTP file. These may be X files that are actually viewable by Web visitors, or X other files that must appear in the Web directory, such as X files used by the Web site search facility. X X 2 NOSERVE A file in the Web directory that is not to be viewed by X Web visitors and does not appear in the FTP archive. X Utility shell scripts, control and configuration files X are examples. X X X XSample Files X------------ X XThis distribution comes with a sample Repository Configuration File Xnamed "Sample.config" that shows most of the constructs available for Xdescribing the Repository architecture. To see how this file is used, Xexecute the command "make sample.html" after installing all files. X X X XContact X------- X XIf you have questions or comments related to the Software Repository, Xcontact: X X Walt Hultgren X Software Repository Administrator X International Informix Users Group X Mailto:software@iiug.org -- HTTP://www.iiug.org/ X X X XSCCS ID: @(#) README 1.10 10/17/02 13:25:28 X X@(#) (c) Copyright 1999-2002 by Walt Hultgren. All rights reserved. SHAR_EOF if [ `wc -c < README` -ne 14409 ] then echo "Lengths do not match -- Bad Copy of README" fi echo "Extracting file Category_header" sed -e 's/^X//' <<\SHAR_EOF > Category_header X X X X X X X

Category Index for:

X SHAR_EOF if [ `wc -c < Category_header` -ne 203 ] then echo "Lengths do not match -- Bad Copy of Category_header" fi echo "Extracting file Makefile" sed -e 's/^X//' <<\SHAR_EOF > Makefile X# Makefile X# X# X# Some typical make commands: X# X# make [all] Makes all Web index pages, but does not install them. X# X# make install Makes all Web index pages and installs them in the X# production Web software directory. Use this if X# only things like entry descriptions or keywords have X# changed, but not file names and not any archive file X# content. X# X# make update Use after you have updated an existing file in the X# FTP archive with a newer version of the same file, X# but have not changed the Configuration file. X# X# make new Use after you have added a new file to the FTP X# archive and entered it into Configuration file or X# if you rename one of the files, groups, etc. X# X# make check-config Checks Configuration file without remaking the X# working files. X# X# make check-index Checks existing Index Data file without remaking X# working files. X# X# make check-files Checks that files in the Web archive directory match X# their counterparts in the FTP archive. Remakes X# working files if necessary. X# X# make check-install Checks local copies of HTML files against those in X# the production Web X# X# make check-all Performs all of the above checks X# X# make clean Removes temporary and generated files. X# X# X# SCCS ID: @(#) Makefile 1.50 10/17/02 13:39:01 X# X# @(#) (c) Copyright 1999-2002 by Walt Hultgren. All rights reserved. X# X X XHTML_DIR = /iiug/iiug/public_html/software XFTP_DIR = /export/home/ftp/pub/informix X XCONFIG_FILE = Repository.config XINDEX_DATA = Repository.index XFILE_DATA = Repository.files X XBUILD = software_index.html \ X index_all.html \ X index_DBA.html \ X index_ESQLC.html \ X index_I4GL.html \ X index_ISQL.html \ X index_JAVA.html \ X index_LSDW.html \ X index_MISC.html \ X index_NEWERA.html \ X index_ORDBMS.html \ X index_SPL.html \ X index_SQL.html X XNEWS = repository_news.html X XSHAR = README \ X Category_header \ X Makefile \ X Other_links \ X Page_footer \ X Page_header \ X Sample.config \ X chk_files.sh \ X chk_index.sh \ X mk_all_cat_html.sh \ X mk_cat_html.sh \ X mk_config.sh \ X mk_filelist.sh \ X mk_html.sh \ X mk_index.sh \ X mkls-lR.sh \ X mkls-ltR.sh \ X synch_web_cmp.sh X XALL = $(BUILD) $(NEWS) X X# X# Make all Software Repository indexes and data files X# X Xall : $(ALL) $(FILE_DATA) X X X# X# Install files for production use X# X Xinstall : X $(MAKE) install-build X $(MAKE) install-news X Xinstall-build : $(BUILD) X install -m 664 $(BUILD) $(HTML_DIR) X Xinstall-news : $(NEWS) X install -m 664 $(NEWS) $(HTML_DIR) X Xinstall-check : html-cmp X X X# X# Compare local HTML indexes against production versions X# X Xhtml-diff diff-html install-diff diff-install diff-installed : $(ALL) X @-for FILE in $(ALL) ; \ X do \ X echo ; \ X echo ===== $$FILE ===== ; \ X diff $(HTML_DIR)/$$FILE $$FILE ; \ X done X Xhtml-cmp cmp-html install-cmp cmp-install cmp-installed : $(ALL) X @-for FILE in $(ALL) ; \ X do \ X cmp $(HTML_DIR)/$$FILE $$FILE ; \ X done X X X# X# Use "make update" when one or more existing Repository files have been X# updated, but no entries have been added or changed in the Configuration X# file. X# X Xupdate : X $(MAKE) ls-lR X $(MAKE) synch-web X $(MAKE) install-news X X X# X# Use "make new" when one or more new entries have been added to the X# Configuration file. X# X Xnew : X $(MAKE) update X $(MAKE) install X X X# X# Shell archive of files for distribution -- see also sample.html below X# X Xshar : repos_maint X Xrepos_maint : $(SHAR) X mkshar $(SHAR) > repos_maint X Xrepos_maint.gz : repos_maint X rm -f repos_maint.gz X gzip repos_maint X Xpublish-config : publish-shar Xpublish-sample : publish-shar Xpublish-shar : repos_maint.gz X install -m 444 repos_maint.gz $(FTP_DIR)/pub X $(MAKE) update X X X# X# Configuration, index and repository file checking X# X Xcheck : X @echo X @echo Usage: X @echo X @echo 'make check-config checks $(CONFIG_FILE) without remake' X @echo 'make check-index checks $(INDEX_DATA) without remake' X @echo 'make check-files checks files in repository' X @echo 'make check-install checks local vs. installed HTML files' X @echo 'make check-all performs all checks X @echo X Xcheck-everything : check-all X Xcheck-all : X $(MAKE) check-config X $(MAKE) check-index X $(MAKE) check-files X $(MAKE) check-install X Xcheck-config : $(CONFIG_FILE) mk_index.sh chk_index.sh X @if [ ! -x mk_index.sh ] ; then chmod +x mk_index.sh ; fi X @if [ ! -x chk_index.sh ] ; then chmod +x chk_index.sh ; fi X mk_index.sh $(CONFIG_FILE) | chk_index.sh X Xcheck-index : $(CONFIG_FILE) chk_index.sh X @if [ ! -x chk_index.sh ] ; then chmod +x chk_index.sh ; fi X -@make -q $(INDEX_DATA) ; if [ $$? -eq 0 ] ; \ X then echo chk_index.sh $(INDEX_DATA) ; chk_index.sh $(INDEX_DATA) ; \ X else $(MAKE) $(INDEX_DATA) ; fi X Xcheck-files : $(FILE_DATA) chk_files.sh X @if [ ! -x chk_files.sh ] ; then chmod +x chk_files.sh ; fi X chk_files.sh $(FILE_DATA) X Xcheck-install : html-cmp X X X# X# Web Repository top index page X# X Xsoftware_index.html : Software_index_1 Other_links Software_index_2 X cat Software_index_1 Other_links Software_index_2 > software_index.html X X X# X# Full Software Web index X# X Xindex_all.html : Page_header Table_part_all Page_footer X cat Page_header Table_part_all Page_footer > index_all.html X XTable_part_all : $(INDEX_DATA) Other_links mk_html.sh X @if [ ! -x mk_html.sh ] ; then chmod +x mk_html.sh ; fi X mk_html.sh $(INDEX_DATA) > Table_part_all X X$(INDEX_DATA) : $(CONFIG_FILE) mk_index.sh chk_index.sh X @if [ ! -x mk_index.sh ] ; then chmod +x mk_index.sh ; fi X @if [ ! -x chk_index.sh ] ; then chmod +x chk_index.sh ; fi X mk_index.sh $(CONFIG_FILE) > $(INDEX_DATA) X chk_index.sh $(INDEX_DATA) X X X# X# Full Software Web index with only the links that point to the FTP archive X# X Xindex_ftp.html : Page_header_ftp Table_part_ftp Page_footer_ftp X cat Page_header_ftp Table_part_ftp Page_footer_ftp > index_ftp.html X XTable_part_ftp : $(INDEX_DATA) Other_links mk_html.sh X @if [ ! -x mk_html.sh ] ; then chmod +x mk_html.sh ; fi X mk_html.sh -f $(INDEX_DATA) > Table_part_ftp X X X# X# Sample Web index page X# X Xsample.html : Sample.config mk_index.sh chk_index.sh mk_html.sh \ X Page_header Page_footer X @if [ ! -x mk_index.sh ] ; then chmod +x mk_index.sh ; fi X @if [ ! -x chk_index.sh ] ; then chmod +x chk_index.sh ; fi X @if [ ! -x mk_html.sh ] ; then chmod +x mk_html.sh ; fi X mk_index.sh Sample.config > Sample.index X chk_index.sh Sample.index X mk_html.sh Sample.index > Sample_table_part X cat Page_header Sample_table_part Page_footer > sample.html X X X# X# I4GL Category Index X# X Xindex_I4GL.html : Category_header Table_part_I4GL Page_footer X cat Category_header Table_part_I4GL Page_footer > index_I4GL.html X XTable_part_I4GL : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh I4GL $(INDEX_DATA) > Table_part_I4GL X X X# X# ESQLC Category Index X# X Xindex_ESQLC.html : Category_header Table_part_ESQLC Page_footer X cat Category_header Table_part_ESQLC Page_footer > index_ESQLC.html X XTable_part_ESQLC : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh ESQLC $(INDEX_DATA) > Table_part_ESQLC X X X# X# ISQL Category Index X# X Xindex_ISQL.html : Category_header Table_part_ISQL Page_footer X cat Category_header Table_part_ISQL Page_footer > index_ISQL.html X XTable_part_ISQL : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh ISQL $(INDEX_DATA) > Table_part_ISQL X X X# X# SPL Category Index X# X Xindex_SPL.html : Category_header Table_part_SPL Page_footer X cat Category_header Table_part_SPL Page_footer > index_SPL.html X XTable_part_SPL : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh SPL $(INDEX_DATA) > Table_part_SPL X X X# X# SQL Category Index X# X Xindex_SQL.html : Category_header Table_part_SQL Page_footer X cat Category_header Table_part_SQL Page_footer > index_SQL.html X XTable_part_SQL : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh SQL $(INDEX_DATA) > Table_part_SQL X X X# X# LSDW Category Index X# X Xindex_LSDW.html : Category_header Table_part_LSDW Page_footer X cat Category_header Table_part_LSDW Page_footer > index_LSDW.html X XTable_part_LSDW : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh LSDW $(INDEX_DATA) > Table_part_LSDW X X X# X# DBA Category Index X# X Xindex_DBA.html : Category_header Table_part_DBA Page_footer X cat Category_header Table_part_DBA Page_footer > index_DBA.html X XTable_part_DBA : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh DBA $(INDEX_DATA) > Table_part_DBA X X X# X# JAVA Category Index X# X Xindex_JAVA.html : Category_header Table_part_JAVA Page_footer X cat Category_header Table_part_JAVA Page_footer > index_JAVA.html X XTable_part_JAVA : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh JAVA $(INDEX_DATA) > Table_part_JAVA X X X# X# NEWERA Category Index X# X Xindex_NEWERA.html : Category_header Table_part_NEWERA Page_footer X cat Category_header Table_part_NEWERA Page_footer > index_NEWERA.html X XTable_part_NEWERA : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh NEWERA $(INDEX_DATA) > Table_part_NEWERA X X X# X# MISC Category Index X# X Xindex_MISC.html : Category_header Table_part_MISC Page_footer X cat Category_header Table_part_MISC Page_footer > index_MISC.html X XTable_part_MISC : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh MISC $(INDEX_DATA) > Table_part_MISC X X X# X# ORDBMS Category Index X# X Xindex_ORDBMS.html : Category_header Table_part_ORDBMS Page_footer X cat Category_header Table_part_ORDBMS Page_footer > index_ORDBMS.html X XTable_part_ORDBMS : $(INDEX_DATA) Other_links mk_cat_html.sh X @if [ ! -x mk_cat_html.sh ] ; then chmod +x mk_cat_html.sh ; fi X mk_cat_html.sh ORDBMS $(INDEX_DATA) > Table_part_ORDBMS X X X# X# Web directory updating X# X X$(FILE_DATA) : $(INDEX_DATA) mk_filelist.sh X @if [ ! -x mk_filelist.sh ] ; then chmod +x mk_filelist.sh ; fi X mk_filelist.sh $(INDEX_DATA) > $(FILE_DATA) X Xsynch-web : $(FILE_DATA) synch_web_cmp.sh X @if [ ! -x synch_web_cmp.sh ] ; then chmod +x synch_web_cmp.sh ; fi X synch_web_cmp.sh $(FILE_DATA) X X X# X# FTP Archive directory listings X# X# The file "ls-lR" is made a second time so that it's own size and X# modification time will be listed correctly in itself. X# X Xls-lR : mkls-lR.sh X @if [ ! -x mkls-lR.sh ] ; then chmod +x mkls-lR.sh ; fi X mkls-lR.sh $(FTP_DIR) > ls-lR X gzip -c ls-lR > ls-lR.gz X install -m 644 ls-lR ls-lR.gz $(FTP_DIR) X rm ls-lR ls-lR.gz X X mkls-lR.sh $(FTP_DIR) > ls-lR X gzip -c ls-lR > ls-lR.gz X install -m 644 ls-lR ls-lR.gz $(FTP_DIR) X rm ls-lR ls-lR.gz X X $(MAKE) ls-ltR X Xls-ltR : mkls-ltR.sh X @if [ ! -x mkls-ltR.sh ] ; then chmod +x mkls-ltR.sh ; fi X mkls-ltR.sh $(FTP_DIR) > ls-ltR X gzip -c ls-ltR > ls-ltR.gz X install -m 644 ls-ltR ls-ltR.gz $(FTP_DIR) X rm ls-ltR ls-ltR.gz X X X# X# Housekeeping X# X Xclean : X rm -f $(BUILD) $(INDEX_DATA) $(FILE_DATA) Table_part* X rm -f Sample.index Sample_table_part sample.html X rm -f ls-lR ls-lR.gz ls-ltR ls-ltR.gz repos_maint repos_maint.gz SHAR_EOF if [ `wc -c < Makefile` -ne 11948 ] then echo "Lengths do not match -- Bad Copy of Makefile" fi echo "Extracting file Other_links" sed -e 's/^X//' <<\SHAR_EOF > Other_links X X X X
  • Special X Software
  • X X
  • User Group FTP X Directories
  • X X
  • Other On-Line Resources
  • X SHAR_EOF if [ `wc -c < Other_links` -ne 432 ] then echo "Lengths do not match -- Bad Copy of Other_links" fi echo "Extracting file Page_footer" sed -e 's/^X//' <<\SHAR_EOF > Page_footer X X X X SHAR_EOF if [ `wc -c < Page_footer` -ne 89 ] then echo "Lengths do not match -- Bad Copy of Page_footer" fi echo "Extracting file Page_header" sed -e 's/^X//' <<\SHAR_EOF > Page_header X X X X X X

    This Index allows you to access the IIUG Software Repository and other XInformix-related archives on the Net.

    X X

    Many entries have both a Download link and a View link. XIn most cases, the View link will display a web-viewable version of the Xfile in your browser. The Download link will allow you to FTP a (usually) Xcompressed version of the file to your local system. For some archive files Xor other multi-file collections, only the Info file is available Xfor Web viewing. You may also perform a Xfull-context search on the entire Xrepository.

    X X

    Some software in this Repository is available via special condition or Xinstruction. These packages are available in the X Special Software section. Please read Xand heed the warnings, notices, and special instructions or agreements with Xeach package.

    X X

    Do you have some software you would like to contribute to the Repository? XIf so, check out the details on Xhow to submit your files. Contact Xsoftware@iiug.org if you have questions Xabout the IIUG Software Repository or this Index.

    X X X X
    XA  XB  XC  XD  XE  XF  XG  XH  XI  XJ  XK  XL  XM  XN  XO  XP  XQ  XR  XS  XT  XU  XV  XW  XX  XY  XZ

    X X

    Multi-File Collections  XOther Sources

    X

    X X

    X SHAR_EOF if [ `wc -c < Page_header` -ne 2185 ] then echo "Lengths do not match -- Bad Copy of Page_header" fi echo "Extracting file Sample.config" sed -e 's/^X//' <<\SHAR_EOF > Sample.config X# Sample Software Repository Configuration File X# X# X# This is a sample Repository Configuration File that shows most of the X# constructs available for describing the Repository architecture. See X# the README file for more details. X# X# To see how this file is used, execute the command "make sample.html". X# This is also a good test to insure that you have all of the scripts X# installed correctly. X# X# X# X# SCCS ID: @(#) Sample.config 1.5 10/17/02 13:25:01 X# X# @(#) (c) Copyright 1999-2002 by Walt Hultgren. All rights reserved. X# X# X X X# X# Set Web and FTP host names and Web base directory X# X X# Leave WEB_HOST blank if building on www.iiug.org. Set it to that host X# name if building elsewhere. X X#WEB_HOST: www.iiug.org XWEB_HOST: X X X# Change WEB_DIR to "../members/memb_software/archive" to make all Web file X# URL's relative. This assumes that the "software" Web directory where the X# Repository Index page resides is on the same level (in the same directory) X# as the "members" directory. X XWEB_DIR: /members/memb_software/archive X X X# Set FTP_HOST to ftp.iiug.org. It might be a separate system some day. X XFTP_HOST: ftp.iiug.org X X X X# X# Valid Category and Source keywords X# X# All Category and Source keywords used in this file must be explicitly X# declared before any file or group entries. The same keyword may be X# used as both a Category and Source keyword as long as it has both a X# Category and Source declaration. X# X XCat: I4GL Informix-4GL Environment or Informix-4GL Source XCat: MISC Miscellaneous Routines and Utilities X XSrc: C C Programing Language XSrc: SH Bourne Shell X X X# X# ls-lR and ls-ltR files for entire FTP archive X# X# Note that the Web files will be obtained by gunzipping the *.gz versions X# rather than by copying ls-lR and ls-ltR from the FTP archive. This X# should not be a problem as long as the ls-l* files are generated normally. X# X XFTP_DIR: /pub/informix X XFile: ls-lR XDesc: Modified 'ls -lR' of entire FTP archive XWeb: ls-lR XFTP: ls-lR.gz XSrc: NONE XCat: MISC X XFile: ls-ltR XDesc: Modified 'ls -ltR' of entire FTP archive XWeb: ls-ltR XFTP: ls-ltR.gz XSrc: NONE XCat: MISC X X X# X# Individual Files X# X# See mk_html.sh for comments related to why there needs to be at least X# one File entry that starts with an "A". X# X XFTP_DIR: /pub/informix/pub X XFile: INDEX XDesc: Summary index of FTP directory /pub/informix/pub XWeb: INDEX XFTP: INDEX XSrc: NONE XCat: MISC X XFile: appstart XDesc: Runs Informix applications setuid XWeb: appstart XFTP: appstart.gz XSrc: C XCat: I4GL X XFile: sccstools XDesc: Collection of tools for working with SCCS XWeb: sccstools XFTP: sccstools.gz XSrc: C, SH XCat: MISC X X X# X# Multi-file Collections X# X XGroup: termcaps XFTP: termcaps XCat: MISC XDesc: A collection of termcap entries submitted by Informix users and/or XDesc: taken from public postings on the Net. In most cases, these entries XDesc: work correctly in the specific environment for which they were XDesc: developed. However, they have been accumulated here without testing XDesc: or editing, so of course "your mileage may vary."

    XDesc: XDesc:

    The entries are divided into files based loosely on the actual and/or XDesc: emulated equipment which they support. This categorization is XDesc: somewhat arbitrary, and is designed mainly to help decide if a new XDesc: entry is already in the archive. There is some overlap of entries; XDesc: e. g., entries for Wyse terminals emulating DEC VT100's appear in the XDesc: files for both "Wyse" and "VTxxx" groups. X XPart: INDEX XWeb: termcaps_INDEX XFTP: termcaps/INDEX X XPart: ANSI XWeb: termcaps_ansi XFTP: termcaps/ansi.gz X XPart: HP XWeb: termcaps_hp XFTP: termcaps/hp.gz X XPart: IBM XWeb: termcaps_ibm XFTP: termcaps/ibm.gz X XPart: Sun XWeb: termcaps_sun XFTP: termcaps/sun.gz X XPart: VTxxx XWeb: termcaps_vt XFTP: termcaps/vt.gz X XPart: Wyse XWeb: termcaps_wyse XFTP: termcaps/wyse.gz X X X# X# Other Sources of Software X# X XLink: FTP_mirror XURL: ftp://ftp.mathcs.emory.edu/pub/informix XDesc: - FTP mirror site XCat: MISC X X X# X# Web and FTP files hidden from Web view X# X XHide: search.html XWeb: search.html X X X# End of File SHAR_EOF if [ `wc -c < Sample.config` -ne 4185 ] then echo "Lengths do not match -- Bad Copy of Sample.config" fi echo "Extracting file chk_files.sh" sed -e 's/^X//' <<\SHAR_EOF > chk_files.sh X#!/bin/sh X# X# chk_files.sh Check Software Repository Web and FTP Files X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_filelist.sh index_data_file > filelist_file X# chk_files.sh filelist_file X# X# X# SCCS ID: @(#) chk_files.sh 1.10 09/17/02 13:37:08 X# X# @(#) (c) Copyright 1999-2002 by Walt Hultgren. All rights reserved. X# X# X X XPATH=":/usr/ucb:/usr/bin:/bin:/opt/local/bin:/opt/gnu/bin:/usr/local/bin" XPATH="$PATH:/iiug/iiug_people/walt/bin" Xexport PATH X X XWEB_DIR='/iiug/iiug/public_html/software/archive' X XTAB=`/usr/bin/echo '\t\c'` X X Xif [ $# -ne 1 ] Xthen X echo "usage: chk_files.sh filelist_file" 1>&2 X exit 1 Xfi X Xcase "$1" in X X /* ) FILELIST="$1" ;; X * ) X=`pwd` ; FILELIST="$X/$1" ;; X Xesac X X Xcd $WEB_DIR X Xfor FILE in * Xdo X if [ -d "$FILE" ] X then X continue X fi X X X=`grep -sc "^$WEB_DIR/${FILE}${TAB}" $FILELIST` X X if [ -z "$X" -o "$X" -eq 0 ] X then X echo "Web file $FILE not in file list" X fi Xdone X X Xnawk ' X X /^$/ {next} # skip blank lines and comments X $1 ~ /^#/ {next} X X X { X web_file = $1 X ftp_file = $2 X X ftp_there = 0 X web_there = 0 X X if ( length( web_file ) && web_file != "NOWEB" ) X { X if ( system( "test -f " web_file ) ) X { X print NR ": Web file " web_file " does not exist" X } X else X { X web_there = 1 X } X } X X if ( length( ftp_file ) && ftp_file != "NOFTP" && ftp_file != "NOSERVE" ) X { X if ( system( "test -f " ftp_file ) ) X { X print NR ": FTP file " ftp_file " does not exist" X } X else X { X ftp_there = 1 X } X } X X X if ( ftp_there && web_there ) X { X if ( ftp_file ~ /\.Z$/ ) X { X cmd = "uncompress -c " ftp_file " | cmp -s - " web_file X msg = "uncompressed " X } X else X { X if ( ftp_file ~ /\.gz$/ ) X { X cmd = "gunzip -c " ftp_file " | cmp -s - " web_file X msg = "gunzipped " X } X else X { X cmd = "cmp -s " ftp_file " " web_file X msg = "" X } X } X X if ( system( cmd ) ) X { X print "" X print msg "ftp file " ftp_file X print "not equal web file " web_file X } X } X } X ' $FILELIST SHAR_EOF if [ `wc -c < chk_files.sh` -ne 2444 ] then echo "Lengths do not match -- Bad Copy of chk_files.sh" fi echo "Extracting file chk_index.sh" sed -e 's/^X//' <<\SHAR_EOF > chk_index.sh X#!/bin/sh X# X# chk_index.sh Check index file X# X# X# Usage: mk_index.sh source_file > index_data_file X# chk_index.sh index_data_file X# X# or: mk_index.sh source_file | chk_index.sh X# X# X# This script checks a repository index file for possible errors. At X# present, not many tests are actually implemented. More will be added X# as time permits. X# X# X# SCCS ID: @(#) chk_index.sh 1.14 10/10/02 16:51:58 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XTAB=`/usr/bin/echo '\t\c'` X X Xnawk -F"$TAB" ' X X BEGIN { X X num_cat = 0 X num_src = 0 X num_file = 0 X num_link = 0 X num_group = 0 X num_part = 0 X num_hide = 0 X X errors = 0 X X } X X X # X # Category keyword definition X # X X $1 == "C" { X X if ( NF != 4 ) X { X err( "Wrong number of fields (" NF ") for C entry" ) X next X } X X cur_cat = $2 X X for ( i = 1; i <= num_cat; ++i ) X { X if ( cat[i] == cur_cat ) X err( "Category Keyword \"" cur_cat \ X "\" on line " cat_line[cat[i]] " duplicated" ) X } X X cat[++num_cat] = $2 X cat_line[cur_cat] = $3 X cat_desc[cur_cat] = $4 X X if ( length( $4 ) == 0 ) X err( "Missing Description for Category Keyword: " cur_cat ) X X next X X } X X X # X # Source keyword definition X # X X $1 == "S" { X X if ( NF != 4 ) X { X err( "Wrong number of fields (" NF ") for S entry" ) X next X } X X cur_src = $2 X X for ( i = 1; i <= num_src; ++i ) X { X if ( src[i] == cur_src ) X err( "Source Keyword \"" cur_src \ X "\" on line " src_line[src[i]] " duplicated" ) X } X X src[++num_src] = $2 X src_line[cur_src] = $3 X src_desc[cur_src] = $4 X X if ( length( $4 ) == 0 ) X err( "Missing Description for Source Keyword: " cur_cat ) X X next X X } X X X X # X # Individual File entry X # X X $1 == "F" { X X if ( NF != 14 ) X { X err( "Wrong number of fields (" NF ") for F entry" ) X next X } X X cur_file = $2 X X for ( i = 1; i <= num_file; ++i ) X { X if ( file_name[i] == cur_file ) X err( "FILE \"" cur_file \ X "\" on line " file_line[file_name[i]] " duplicated" ) X } X X file_name[++num_file] = $2 X file_line[cur_file] = $3 X file_desc[cur_file] = $4 X file_src[cur_file] = $5 X file_cat[cur_file] = $6 X file_ftp[cur_file] = $7 X file_web[cur_file] = $8 X file_info[cur_file] = $9 X file_iftp[cur_file] = $10 X file_fhost[cur_file] = $11 X file_fdir[cur_file] = $12 X file_whost[cur_file] = $13 X file_wdir[cur_file] = $14 X X #if ( length( file_src[cur_file] ) == 0 \ X # && length( file_cat[cur_file] ) == 0 ) X # errl( file_line[cur_file], X # "No Source or Category keywords for file: " cur_file ) X X if ( length( file_src[cur_file] ) ) X if ( length( file_cat[cur_file] ) ) X next X else X wrnl( file_line[cur_file], X "No Category keyword for file: " cur_file ) X else X if ( length( file_cat[cur_file] ) ) X wrnl( file_line[cur_file], X "No Source keyword for file: " cur_file ) X else X errl( file_line[cur_file], X "No Source or Category keywords for file: " cur_file ) X X next X X } X X X # X # Group header entry X # X X $1 == "G" { X X if ( NF != 16 ) X { X err( "Wrong number of fields for G entry" ) X next X } X X cur_group = $2 X X for ( i = 1; i <= num_group; ++i ) X { X if ( group_name[i] == cur_group ) X err( "FILE \"" cur_group \ X "\" on line " group_line[group_name[i]] " duplicated" ) X } X X group_name[++num_group] = $2 X group_line[cur_group] = $3 X group_ftp[cur_group] = $4 X group_cat[cur_group] = $5 X group_src[cur_group] = $6 X group_fhost[cur_group] = $7 X group_fdir[cur_group] = $8 X group_whost[cur_group] = $9 X group_wdir[cur_group] = $10 X group_gfhost[cur_group] = $11 X group_gfdir[cur_group] = $12 X group_gwhost[cur_group] = $13 X group_gwdir[cur_group] = $14 X group_ndesc[cur_group] = $15 X group_npart[cur_group] = $16 X X if ( length( group_src[cur_group] ) == 0 \ X && length( group_cat[cur_group] ) == 0 ) X errl( group_line[cur_group], X "No Source or Category keywords for group: " cur_group ) X X num_gd = 0 X num_part = 0 X X next X X } X X X # X # Group description line entry X # X X $1 == "GD" { X X if ( NF != 3 ) X { X err( "Wrong number of fields for GD entry" ) X next X } X X if ( ++num_gd > group_ndesc[cur_group] ) X { X errl( group_line[cur_group], X "Too many Description lines for Group " cur_group ) X next X } X X group_desc[cur_group, num_gd] = $2 X group_dlin[cur_group, num_gd] = $3 X X next X X } X X X # X # Group Part entry X # X X $1 == "P" { X X if ( NF != 18 ) X { X err( "Wrong number of fields for P entry" ) X next X } X X if ( num_part >= group_npart[cur_group] ) X { X errl( group_line[cur_group], "Too many Parts for Group " cur_group ) X next X } X X for ( i = 1; i <= num_part; ++i ) X { X if ( part_name[cur_group, i] == $2 ) X err( "PART \"" $2 "\" on line " part_line[cur_group, i] \ X " duplicated within GROUP \"" cur_group "\"" ) X } X X ++num_part X X part_name[cur_group, num_part] = $2 X part_line[cur_group, num_part] = $3 X part_desc[cur_group, num_part] = $4 X part_src[cur_group, num_part] = $5 X part_cat[cur_group, num_part] = $6 X part_ftp[cur_group, num_part] = $7 X part_web[cur_group, num_part] = $8 X part_info[cur_group, num_part] = $9 X part_iftp[cur_group, num_part] = $10 X part_fhost[cur_group, num_part] = $11 X part_fdir[cur_group, num_part] = $12 X part_whost[cur_group, num_part] = $13 X part_wdir[cur_group, num_part] = $14 X part_gfhost[cur_group, num_part] = $15 X part_gfdir[cur_group, num_part] = $16 X part_gwhost[cur_group, num_part] = $17 X part_gwdir[cur_group, num_part] = $18 X X next X X } X X X # X # Link entry X # X X $1 == "L" { X X if ( NF != 7 ) X { X err( "Wrong number of fields for L entry" ) X next X } X X cur_link = $2 X X for ( i = 1; i <= num_link; ++i ) X { X if ( link_name[i] == cur_link ) X err( "FILE \"" cur_link \ X "\" on line " link_line[link_name[i]] " duplicated" ) X } X X link_name[++num_link] = $2 X link_line[cur_link] = $3 X link_desc[cur_link] = $4 X link_src[cur_link] = $5 X link_cat[cur_link] = $6 X link_url[cur_link] = $7 X X if ( length( link_src[cur_link] ) == 0 \ X && length( link_cat[cur_link] ) == 0 ) X errl( link_line[cur_link], X "No Source or Category keywords for link: " cur_link ) X X next X X } X X X # X # Hidden file entry X # X X $1 == "H" { X X if ( NF != 9 ) X { X err( "Wrong number of fields for H entry" ) X next X } X X cur_hide = $2 X X for ( i = 1; i <= num_hide; ++i ) X { X if ( hide_name[i] == cur_hide ) X err( "HIDDEN name \"" cur_hide \ X "\" on line " hide_line[hide_name[i]] " duplicated" ) X } X X hide_name[++num_hide] = $2 X hide_line[cur_hide] = $3 X hide_ftp[cur_hide] = $4 X hide_web[cur_hide] = $5 X hide_fhost[cur_hide] = $6 X hide_fdir[cur_hide] = $7 X hide_whost[cur_hide] = $8 X hide_wdir[cur_hide] = $9 X X next X X } X X X { X err( "Illegal index entry type" ) X } X X X END { X X exit errors X X } X X X# X# Function to print a warning message including source line number X# X Xfunction wrnl( line, msg ) { X X #system( "echo \"" FILENAME ", " NR ": " msg "\" 1>&2" ) X X print FILENAME ", Idx Rec " NR ", Src L# " line " Warning: " msg X X } X X X# X# Function to print an error message X# X Xfunction err( msg ) { X X #system( "echo \"" FILENAME ", " NR ": " msg "\" 1>&2" ) X X print FILENAME ", Idx Rec " NR ": " msg X X ++errors X X } X X X# X# Function to print an error message including source line number X# X Xfunction errl( line, msg ) { X X #system( "echo \"" FILENAME ", " NR ": " msg "\" 1>&2" ) X X print FILENAME ", Idx Rec " NR ", Src L# " line ": " msg X X ++errors X X } X X ' $* SHAR_EOF if [ `wc -c < chk_index.sh` -ne 8454 ] then echo "Lengths do not match -- Bad Copy of chk_index.sh" fi echo "Extracting file mk_all_cat_html.sh" sed -e 's/^X//' <<\SHAR_EOF > mk_all_cat_html.sh X#!/bin/sh X# X# mk_all_cat_html.sh Make Web index pages for all categories X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_all_cat_html.sh index_data_file X# X# X# This script will make a category index Web page for each category X# keyword found in the source Repository Configuration File. X# X# Note: This scritp is not currently used in production. X# X# X# SCCS ID: @(#) mk_all_cat_html.sh 1.3 09/22/01 18:49:34 X# X# @(#) (c) Copyright 2001 by Walt Hultgren. All rights reserved. X# X# X# X X XTAB=`/usr/bin/echo '\t\c'` X X Xif [ $# -ne 1 ] Xthen X echo "usage: mk_all_cat_html.sh index_data_file" 1>&2 X exit 1 Xfi X XINDEX_FILE="$1" X X Xfor CAT in `grep "^C$TAB" $INDEX_FILE | cut -f2 | sort | uniq` Xdo X echo "mk_cat_html.sh $CAT $INDEX_FILE > index_${CAT}.html" X X mk_cat_html.sh $CAT $INDEX_FILE > index_${CAT}.html X Xdone SHAR_EOF if [ `wc -c < mk_all_cat_html.sh` -ne 856 ] then echo "Lengths do not match -- Bad Copy of mk_all_cat_html.sh" fi echo "Extracting file mk_cat_html.sh" sed -e 's/^X//' <<\SHAR_EOF > mk_cat_html.sh X#!/bin/sh X# X# mk_cat_html.sh X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_cat_html.sh category index_data_file X# X# or: mk_index.sh source_file | mk_cat_html.sh category X# X# X# Assumes order of index is keywords, files, groups, links, hidden entries. X# X# X# SCCS ID: @(#) mk_cat_html.sh 1.12 10/10/02 16:51:59 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XTAB=`/usr/bin/echo '\t\c'` X X Xif [ $# -lt 1 ] Xthen X echo "usage: mk_cat_html.sh category [index_data_file]" 1>&2 X exit 1 Xfi X XHTML_CAT="$1" Xshift X X Xnawk -F"$TAB" -v htmlcat="$HTML_CAT" ' X X BEGIN { X X locase = "abcdefghijklmnopqrstuvwxyz" X upcase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" X X td = "" X X num_keyw = 0 X no_links = 1 X cur_section = "" X } X X X $1 == "H" { next } X X X $1 == "C" || $1 == "S" { X X if ( NF != 4 ) X { X err( "Wrong number of fields (" NF ") for C or S entry" ) X next X } X X for ( i = 1; i <= num_keyw; ++i ) X { X if ( keywd[i] == $2 ) break X } X X if ( i > num_keyw ) keywd[++num_keyw] = $2 X X if ( $1 == "S" ) next X X } X X X $1 == "C" { X X if ( NF != 4 ) X { X err( "Wrong number of fields (" NF ") for K entry" ) X next X } X X cur_keywd = $2 X keyw_line = $3 X keyw_desc = $4 X X if ( cur_keywd != htmlcat ) next X X if ( cur_section != "K" ) new_section( "K" ) X X #print "" cur_keywd " - " \ X #keyw_desc "" X X print cur_keywd " - " keyw_desc X X next X X } X X X $1 == "F" { X X if ( NF != 14 ) X { X err( "Wrong number of fields (" NF ") for F entry" ) X next X } X X cur_file = $2 X file_line = $3 X file_desc = $4 X file_src = $5 X file_cat = $6 X file_ftp = $7 X file_web = $8 X file_info = $9 X file_iftp = $10 X file_fhost = $11 X file_fdir = $12 X file_whost = $13 X file_wdir = $14 X X if ( file_src == "NONE" ) file_src = "" X if ( file_cat == "NONE" ) file_cat = "" X X X if ( ok_cat( file_cat ) ) X { X keywds = fix_kwds( file_src " " file_cat, file_line ) X X keywds = " [" keywds "]" X } X else X { X next X } X X if ( cur_section != "F" ) new_section( "F" ) X X X print "" X print "" X print td "" \ X "" cur_file "" X X print td ( length(file_desc) ? file_desc : " " ) \ X ( length(keywds) ? keywds : " " ) \ X "" X X X if ( length( file_ftp ) ) X { X file_ftp = url( "f", file_fhost, file_fdir, file_ftp ) X X print td "Download" X } X else X { X print td " " X } X X X if ( length( file_web ) ) X { X file_web = url( "h", file_whost, file_wdir, file_web ) X X print td "View" X } X else X { X if ( length( file_info ) ) X { X file_info = url( "h", file_whost, file_wdir, file_info ) X X print td "Info" X } X else X { X print td " " X } X } X X print "" X X next X X } X X X $1 == "G" { X X if ( NF != 16 ) X { X err( "Wrong number of fields for G entry" ) X next X } X X cur_group = $2 X group_line = $3 X group_ftp = $4 X group_cat = $5 X group_src = $6 X group_fhost = $7 X group_fdir = $8 X group_whost = $9 X group_wdir = $10 X group_gfhost = $11 X group_gfdir = $12 X group_gwhost = $13 X group_gwdir = $14 X group_ndesc = $15 X group_npart = $16 X X if ( group_src == "NONE" ) group_src = "" X if ( group_cat == "NONE" ) group_cat = "" X X X if ( ok_cat( group_cat ) ) X { X keywds = fix_kwds( group_src " " group_cat, group_line ) X X keywds = " [" keywds "]" X X ok_group = 1 X } X else X { X keywds = "" X ok_group = 0 X X next X } X X if ( cur_section != "G" ) new_section( "G" ) X X X print "" X print "

    " X X if ( length( group_ftp ) ) X { X group_ftp = gurl( "f", group_fhost, group_gfhost, X group_fdir, group_gfdir, group_ftp ) X print "" cur_group "
    " X } X else X { X print cur_group "" X } X X if ( group_ndesc || group_npart ) print "
    " X X part_num = 0 X X next X X } X X X $1 == "GD" { X X if ( NF != 3 ) X { X err( "Wrong number of fields for GD entry" ) X next X } X X if ( ! ok_group ) next X X group_desc = $2 X group_dlin = $3 X X print " " group_desc X X if ( --group_ndesc == 0 ) X { X print " " keywds X X if ( group_npart == 0 ) print "

    " X } X X next X X } X X X $1 == "P" { X X if ( NF != 18 ) X { X err( "Wrong number of fields for P entry" ) X next X } X X if ( ! ok_group ) next X X part_name = $2 X part_line = $3 X part_desc = $4 X part_src = $5 X part_cat = $6 X part_ftp = $7 X part_web = $8 X part_info = $9 X part_iftp = $10 X part_fhost = $11 X part_fdir = $12 X part_whost = $13 X part_wdir = $14 X part_gfhost = $15 X part_gfdir = $16 X part_gwhost = $17 X part_gwdir = $18 X X if ( part_src == "NONE" ) part_src = "" X if ( part_cat == "NONE" ) part_cat = "" X X X if ( length( part_cat ) || length( part_src ) ) X { X keywds = fix_kwds( part_src " " part_cat, part_line ) X X keywds = " [" keywds "]" X } X else X { X keywds = "" X } X X if ( part_num == 0 ) X { X print "" X print " " X } X X ++part_num X X print "" X print " " X print " " td "" part_name "" X X print " " td ( length(part_desc) ? part_desc : " " ) \ X ( length(keywds) ? keywds : " " ) \ X "" X X X if ( length( part_ftp ) ) X { X part_ftp = gurl( "f", part_fhost, part_gfhost, X part_fdir, part_gfdir, part_ftp ) X X print " " td "Download" X } X else X { X print " " td " " X } X X X if ( length( part_web ) ) X { X part_web = gurl( "h", part_whost, part_gwhost, X part_wdir, part_gwdir, part_web ) X X print " " td "View" X } X else X { X if ( length( part_info ) ) X { X part_info = gurl( "h", part_whost, part_gwhost, X part_wdir, part_gwdir, part_info ) X X print " " td "Info" X } X else X { X print " " td " " X } X } X X print " " X X X if ( --group_npart == 0 ) X { X print "" X print "
    " X print "

    " X } X X X next X X } X X X $1 == "L" { X X if ( NF != 7 ) X { X err( "Wrong number of fields for L entry" ) X next X } X X cur_link = $2 X link_line = $3 X link_desc = $4 X link_src = $5 X link_cat = $6 X link_url = $7 X X if ( link_src == "NONE" ) link_src = "" X if ( link_cat == "NONE" ) link_cat = "" X X X if ( ok_cat( link_cat ) ) X { X keywds = fix_kwds( link_src " " link_cat, link_line ) X X keywds = " [" keywds "]" X } X else X { X next X } X X if ( cur_section != "L" ) new_section( "L" ) X X X print "" X print "

  • " cur_link "" X X print " " link_desc keywds "
  • " X X no_links = 0 X X next X X } X X X { X err( "Illegal index entry type" ) X } X X X END { X X # X # Force Other Sources (Links) Section if necessary X # X X if ( no_links ) new_section( "L" ) X X X # X # Finish page X # X X new_section( "E" ) X X exit X X } X X X# X# Function to test for category being indexed X# X# Returns: 1 ==> category found X# 0 ==> category not present X# X Xfunction ok_cat( cat, arr, n, i ) { X X if ( ( n = split( cat, arr, " " ) ) == 0 ) return 0 X X for ( i = 1; i <= n; ++i ) X { X if ( arr[i] == htmlcat ) return 1 X } X X return 0 X X } X X X# X# Function to process moving from one section to the next X# X# Assumes order of index is keywords, files, groups, links, hidden entries. X# X Xfunction new_section( new_section ) { X X if ( cur_section == "" ) page_header() X else if ( cur_section == "K" ) keyword_footer() X else if ( cur_section == "F" ) file_footer() X else if ( cur_section == "G" ) group_footer() X else if ( cur_section == "L" ) link_footer() X X if ( new_section == "K" ) keyword_header() X else if ( new_section == "F" ) file_header() X else if ( new_section == "G" ) group_header() X else if ( new_section == "L" ) link_header() X else page_footer() X X cur_section = new_section X X } X X X# X# Function to print page header -- Currently handled by Makefile X# X Xfunction page_header() { X X #print "" X #print "" X #print "" X X } X X X# X# Function to print Keyword section header X# X Xfunction keyword_header() { X X print "

    " X X } X X X# X# Function to print Keyword section footer X# X Xfunction keyword_footer() { X X print "

    " X print "" X print "
    " X print "" X X } X X X# X# Function to print File section header X# X Xfunction file_header() { X X print "

    Individual Files

    " X X print "" X X } X X X# X# Function to print File section footer X# X Xfunction file_footer() { X X print "" X print "
    " X print "
    " X print "" X print "" X X } X X X# X# Function to print Group section header X# X Xfunction group_header() { X X print "

    Multi-File Collections

    " X X print "
    " X X } X X X# X# Function to print Group section footer X# X Xfunction group_footer() { X X print "" X print "
    " X print "
    " X print "" X print "" X X } X X X# X# Function to print Other Links section header X# X Xfunction link_header() { X X print "

    Other Sources for Software

    " X X print "

    This section contains links to other sources for software. To" X print "be listed in this section, software must be of broad applicability" X print "in an Informix enviroment, such as database development and" X print "management utilities or general purpose end-user tools. It must" X print "also be open source or freeware, or must have a free demo or" X print "evaluation version available.

    " X print "" X X print "
      " X X } X X X# X# Function to print Other Links section footer X# X Xfunction link_footer() { X X print "" X print "

      " X print "" X X if ( system( "cat Other_links" ) ) exit 1 X X print "" X print "

    " X print "
    " X print "" X print "" X X } X X X# X# Function to print page footer -- Currently handled by Makefile X# X Xfunction page_footer() { X X #print "" X #print "" X #print "" X X } X X X# X# Function to construct a full URL X# X# Rules: X# X# If file starts with protocol ("ftp:", "http:"), use file, else X# build URL that consists of host part followed by pathname part. X# X# To build pathname part: If file starts with "/" or directory is X# blank, use just file, else concatenate directory and file. Add X# a "/" between the two if necessary. X# X# To build host part: If host is blank, do not use it. This could X# cause problems with FTP. If host is non-blank, prepend protocol X# if it does not start with it already, then concatenate host and X# pathname part. Add a "/" between the two if necessary. X# X Xfunction url( protocol, host, dir, file ) { X X if ( protocol ~ /[Ff]/ ) X { X if ( file ~ /[Ff][Tt][Pp]:/ ) return file X } X else X { X if ( file ~ /[Hh][Tt][Tt][Pp]:/ ) return file X } X X if ( file !~ /^\// && length( dir ) ) X { X file = dir ( ( dir !~ /\/$/ ) ? "/" : "" ) file X } X X if ( length( host ) ) X { X if ( protocol ~ /[Ff]/ ) X { X if ( host !~ /[Ff][Tt][Pp]:/ ) host = "ftp://" host X } X else X { X if ( file !~ /[Hh][Tt][Tt][Pp]:/ ) host = "http://" host X } X X file = host ( ( host !~ /\/$/ && file !~ /^\// ) ? "/" : "" ) file X } X X return file X X } X X X# X# Function to construct a full URL for use within a GROUP X# X Xfunction gurl( protocol, host, ghost, dir, gdir, file ) { X X #if ( length( ghost ) ) host = ghost X #if ( length( gdir ) ) dir = gdir X X #return url( protocol, host, dir, file ) X X return url( protocol, X ( length( ghost ) ? ghost : host ), X ( length( gdir ) ? gdir : dir ), X file ) X X } X X X# X# Function to clean up and format a sring of category or source keywords X# X Xfunction fix_kwds( kwds, line, num, num_pack, arr, i, j, min_idx, min_val ) { X X gsub( ",", " " ) # replace commas with blanks X #gsub( "([ \t])+", " " ) # compress whitespace X X kwds = upshift( kwds ) # force to upper case X X num = split( kwds, arr, " " ) # split keywords into an array X X if ( num == 0 ) return "" # return if there are no keywords X X X # X # Sort keywords and eliminate duplicates if more than one X # X X if ( num > 1 ) X { X for ( i = 1; i < num; ++i ) X { X min_idx = i X min_val = arr[i] X X for ( j = i+1; j <= num; ++j ) X { X if ( arr[j] < min_val ) X { X min_idx = j X min_val = arr[j] X } X } X X if ( min_idx != i ) X { X arr[min_idx] = arr[i] X arr[i] = min_val X } X } X X num_pack = 1 X X for ( i = 2; i <= num; ++i ) X { X if ( arr[i] != arr[num_pack] ) X if ( ++num_pack != i ) arr[num_pack] = arr[i] X } X X num = num_pack X } X X for ( i = 1; i <= num; ++i ) X { X for ( j = 1; j <= num_keyw; ++j ) X { X if ( arr[i] == keywd[j] ) break X } X X if ( j > num_keyw ) errl( line, "Undefined KEYWORD: " arr[i] ) X } X X kwds = arr[1] X X for ( i = 2; i <= num; ++i ) X { X kwds = kwds ", " arr[i] X } X X return kwds X X } X X X# X# Function to print an error message X# X Xfunction err( msg ) { X X errl( NR, msg ) X X } X X X# X# Function to print an error message X# X Xfunction errl( line, msg ) { X X #print FILENAME ", " NR ": " msg X X system( "echo \"" FILENAME ", " line ": " msg "\" 1>&2" ) X X ++errors X X } X X X# X# Function to force letters of a string to upper case X# X Xfunction upshift( str, xstr, xc, i, j ) { X X xstr = "" X X for ( i = 1; i <= length( str ); ++i ) X { X xc = substr( str, i, 1 ) X X if ( ( j = index( locase, xc ) ) ) xstr = xstr substr( upcase, j, 1 ) X else xstr = xstr xc X } X X return xstr X X } X X ' $* SHAR_EOF if [ `wc -c < mk_cat_html.sh` -ne 15361 ] then echo "Lengths do not match -- Bad Copy of mk_cat_html.sh" fi echo "Extracting file mk_config.sh" sed -e 's/^X//' <<\SHAR_EOF > mk_config.sh X#!/bin/sh X# X# mk_config.sh X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_config.sh index_data_file > new_config_file X# X# or: mk_index.sh source_file | mk_config.sh > new_config_file X# X# X# This script will regenerate a configuration file from an existing X# index file. Note that all comments in the original configuration X# file are lost when the initial index file is generated. This script X# would usually be used only in an emergency or as part of an initial X# loading of configuration data from another source. X# X# Note: This script is somewhat obsolete. It stil recognizes "K" X# (Keyword) index record types which have been replaces by "C" (Category X# Keyword Definition) and "S" (Source Keyword Definition) record types, X# which it doesn't recognize. X# X# X# SCCS ID: @(#) mk_config.sh 1.5 10/10/02 16:51:59 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XTAB=`/usr/bin/echo '\t\c'` X X Xnawk -F"$TAB" ' X X BEGIN { X X web_host = "" X ftp_host = "" X X web_dir = "" X ftp_dir = "" X X group_web_host = "" X group_ftp_host = "" X X group_web_dir = "" X group_ftp_dir = "" X X cur_sect = "" X X "date" | getline datestamp X X print "# Generated by mk_config.sh " datestamp X print "#" X print "#" X X } X X X# X# *** Change this to handle "C" and "S" if you want to run this script X# *** against a current index data file. WH 05/09/2000 X# X X $1 == "K" { X X if ( NF != 4 ) X { X err( "Wrong number of fields (" NF ") for K entry" ) X next X } X X if ( cur_sect != $1 ) X { X print "" X print "" X print "#" X print "# Keywords" X print "#" X print "" X X cur_sect = $1 X } X X keywd = $2 X keyw_line = $3 X keyw_desc = $4 X X print "KEYWD:\t" keywd "\t" keyw_desc X X next X X } X X X X $1 == "F" { X X if ( NF != 14 ) X { X err( "Wrong number of fields (" NF ") for F entry" ) X next X } X X if ( cur_sect != $1 ) X { X print "" X print "" X print "#" X print "# Individual Files" X print "#" X X cur_sect = $1 X } X X file_name = $2 X file_line = $3 X file_desc = $4 X file_src = $5 X file_cat = $6 X file_ftp = $7 X file_web = $8 X file_info = $9 X file_iftp = $10 X file_fhost = $11 X file_fdir = $12 X file_whost = $13 X file_wdir = $14 X X params( file_whost, file_wdir, file_fhost, file_fdir ) X X gsub( " ", ", ", file_src ) X gsub( " ", ", ", file_cat ) X X print "" X print "File: " file_name X print "Desc: " file_desc X X if ( length( file_web ) ) print "Web: " file_web X if ( length( file_ftp ) ) print "FTP: " file_ftp X if ( length( file_info ) ) print "Info: " file_info X if ( length( file_iftp ) ) print "IFTP: " file_iftp X if ( length( file_src ) ) print "Src: " file_src X if ( length( file_cat ) ) print "Cat: " file_cat X X next X X } X X X $1 == "G" { X X if ( NF != 16 ) X { X err( "Wrong number of fields for G entry" ) X next X } X X if ( cur_sect != $1 ) X { X print "" X print "" X print "#" X print "# Groups" X print "#" X X cur_sect = $1 X } X X group_name = $2 X group_line = $3 X group_ftp = $4 X group_cat = $5 X group_src = $6 X group_fhost = $7 X group_fdir = $8 X group_whost = $9 X group_wdir = $10 X group_gfhost = $11 X group_gfdir = $12 X group_gwhost = $13 X group_gwdir = $14 X group_ndesc = $15 X group_npart = $16 X X params( group_whost, group_wdir, group_fhost, group_fdir ) X X gparams( group_gwhost, group_gwdir, group_gfhost, group_gfdir ) X X gsub( " ", ", ", group_src ) X gsub( " ", ", ", group_cat ) X X print "" X print "" X print "Group: " group_name X X if ( length( group_ftp ) ) print "FTP: " group_ftp X if ( length( group_src ) ) print "Src: " group_src X if ( length( group_cat ) ) print "Cat: " group_cat X X next X X } X X X $1 == "GD" { X X if ( NF != 3 ) X { X err( "Wrong number of fields for GD entry" ) X next X } X X group_desc = $2 X group_dlin = $3 X X print "Desc:" ( length( group_desc ) ? " " group_desc : "" ) X #if ( length( group_desc ) ) print "Desc: " group_desc X #else print "Desc" X X next X X } X X X $1 == "P" { X X if ( NF != 18 ) X { X err( "Wrong number of fields for P entry" ) X next X } X X part_name = $2 X part_line = $3 X part_desc = $4 X part_src = $5 X part_cat = $6 X part_ftp = $7 X part_web = $8 X part_info = $9 X part_iftp = $10 X part_fhost = $11 X part_fdir = $12 X part_whost = $13 X part_wdir = $14 X part_gfhost = $15 X part_gfdir = $16 X part_gwhost = $17 X part_gwdir = $18 X X params( part_whost, part_wdir, part_fhost, part_fdir ) X X gparams( part_gwhost, part_gwdir, part_gfhost, part_gfdir ) X X gsub( " ", ", ", part_src ) X gsub( " ", ", ", part_cat ) X X print "" X print "Part: " part_name X X if ( length( part_desc ) ) print "Desc: " part_desc X if ( length( part_web ) ) print "Web: " part_web X if ( length( part_ftp ) ) print "FTP: " part_ftp X if ( length( part_info ) ) print "Info: " part_info X if ( length( part_iftp ) ) print "IFTP: " part_iftp X if ( length( part_src ) ) print "Src: " part_src X if ( length( part_cat ) ) print "Cat: " part_cat X X next X X } X X X $1 == "L" { X X if ( NF != 7 ) X { X err( "Wrong number of fields for L entry" ) X next X } X X if ( cur_sect != $1 ) X { X print "" X print "" X print "#" X print "# Links" X print "#" X X cur_sect = $1 X } X X link_name = $2 X link_line = $3 X link_desc = $4 X link_src = $5 X link_cat = $6 X link_url = $7 X X gsub( " ", ", ", link_src ) X gsub( " ", ", ", link_cat ) X X print "" X print "Link: " link_name X print "URL: " link_url X print "Desc: " link_desc X X if ( length( link_src ) ) print "Src: " link_src X if ( length( link_cat ) ) print "Cat: " link_cat X X next X X } X X X $1 == "H" { X X if ( NF != 9 ) X { X err( "Wrong number of fields for H entry" ) X next X } X X if ( cur_sect != $1 ) X { X print "" X print "" X print "#" X print "# Hidden Files" X print "#" X X cur_sect = $1 X } X X hide_name = $2 X hide_line = $3 X hide_ftp = $4 X hide_web = $5 X hide_fhost = $6 X hide_fdir = $7 X hide_whost = $8 X hide_wdir = $9 X X params( hide_whost, hide_wdir, hide_fhost, hide_fdir ) X X X print "" X print "Hide: " hide_name X X if ( length( hide_web ) ) print "Web: " hide_web X if ( length( hide_ftp ) ) print "FTP: " hide_ftp X X next X X } X X X { X err( "Illegal index entry type" ) X } X X X END { X X exit errors X X } X X X# X# Function to check global host and base directory parameters X# X Xfunction params( whost, wdir, fhost, fdir ) { X X if ( web_host != whost ) X { X print "" X print "WEB_HOST: " whost X X web_host = whost X } X X if ( web_dir != wdir ) X { X print "" X print "WEB_DIR: " wdir X X web_dir = wdir X } X X if ( ftp_host != fhost ) X { X print "" X print "FTP_HOST: " fhost X X ftp_host = fhost X } X X if ( ftp_dir != fdir ) X { X print "" X print "FTP_DIR: " fdir X X ftp_dir = fdir X } X X } X X X# X# Function to check group host and base directory parameters X# X Xfunction gparams( gwhost, gwdir, gfhost, gfdir ) { X X if ( group_web_host != gwhost ) X { X print "" X print "GROUP_WEB_HOST: " gwhost X X group_web_host = gwhost X } X X if ( group_web_dir != gwdir ) X { X print "GROUP_WEB_DIR: " gwdir X X group_web_dir = gwdir X } X X if ( group_ftp_host != gfhost ) X { X print "" X print "GROUP_FTP_HOST: " gfhost X X group_ftp_host = gfhost X } X X if ( group_ftp_dir != gfdir ) X { X print "" X print "GROUP_FTP_DIR: " gfdir X X group_ftp_dir = gfdir X } X X } X X X# X# Function to print an error message X# X Xfunction err( msg ) { X X #print FILENAME ", " NR ": " msg X X system( "echo \"" FILENAME ", " NR ": " msg "\" 1>&2" ) X X ++errors X X } X X X# X# Function to print an error message include source line number X# X Xfunction errl( line, msg ) { X X #print FILENAME ", " NR "/" line ": " msg X X system( "echo \"" FILENAME ", " NR ": " msg "\" 1>&2" ) X X ++errors X X } X X ' $* SHAR_EOF if [ `wc -c < mk_config.sh` -ne 8645 ] then echo "Lengths do not match -- Bad Copy of mk_config.sh" fi echo "Extracting file mk_filelist.sh" sed -e 's/^X//' <<\SHAR_EOF > mk_filelist.sh X#!/bin/sh X# X# mk_filelist.sh X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_filelist.sh index_data_file > Filelist X# X# or: mk_index.sh source_file | mk_filelist.sh > Filelist X# X# X# SCCS ID: @(#) mk_filelist.sh 1.8 10/10/02 16:51:59 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XTAB=`/usr/bin/echo '\t\c'` X X Xnawk -F"$TAB" ' X X BEGIN { X X ftp_home = "/export/home/ftp" X web_home = "/iiug/iiug/public_html" X X num_ftp = 0 X num_web = 0 X num_nosf = 0 X num_nosw = 0 X X errors = 0 X X } X X X $1 == "C" { next } X $1 == "G" { next } X $1 == "GD" { next } X $1 == "L" { next } X $1 == "S" { next } X X X $1 == "F" { X X if ( NF != 14 ) X { X err( "Wrong number of fields (" NF ") for F entry" ) X next X } X X cur_file = $2 X file_line = $3 X file_desc = $4 X file_src = $5 X file_cat = $6 X file_ftp = $7 X file_web = $8 X file_info = $9 X file_iftp = $10 X file_fhost = $11 X file_fdir = $12 X file_whost = $13 X file_wdir = $14 X X X file_ftp = path( "F", file_fhost, file_fdir, file_ftp ) X file_web = path( "H", file_whost, file_wdir, file_web ) X X X# if ( length( file_ftp ) ) X# { X# for ( i = 1; i <= num_ftp; ++i ) X# { X# if ( ftp_path[i] == file_ftp ) X# { X# err( "Duplicate FTP file: " file_ftp ) X# } X# } X# X# ftp_path[++num_ftp] = file_ftp X# } X# X# if ( length( file_web ) ) X# { X# for ( i = 1; i <= num_web; ++i ) X# { X# if ( web_path[i] == file_web ) X# { X# err( "Duplicate Web file: " file_web ) X# } X# } X# X# web_path[++num_web] = file_web X# } X X X if ( length( file_web ) ) X { X if ( length( file_ftp ) ) X { X print file_web "\t" file_ftp X X web_path[++num_web] = file_web X ftp_path[++num_ftp] = file_ftp X } X else X { X print file_web "\t" "NOFTP" X X web_path[++num_web] = file_web X } X } X else X { X if ( length( file_ftp ) ) X { X print "NOWEB" "\t" file_ftp X X ftp_path[++num_ftp] = file_ftp X } X } X X X file_iftp = path( "F", file_fhost, file_fdir, file_iftp ) X file_info = path( "H", file_whost, file_wdir, file_info ) X X X# if ( length( file_iftp ) ) X# { X# for ( i = 1; i <= num_ftp; ++i ) X# { X# if ( ftp_path[i] == file_iftp ) X# { X# err( "Duplicate FTP file: " file_iftp ) X# } X# } X# X# ftp_path[++num_ftp] = file_ftp X# } X# X# if ( length( file_info ) ) X# { X# for ( i = 1; i <= num_web; ++i ) X# { X# if ( web_path[i] == file_info ) X# { X# err( "Duplicate Web file: " file_info ) X# } X# } X# X# web_path[++num_web] = file_info X# } X X X if ( length( file_info ) ) X { X if ( length( file_iftp ) ) X { X print file_info "\t" file_iftp X X web_path[++num_web] = file_info X ftp_path[++num_ftp] = file_iftp X } X else X { X print file_info "\t" "NOFTP" X X web_path[++num_web] = file_info X } X } X else X { X if ( length( file_iftp ) ) X { X print "NOWEB" "\t" file_iftp X X ftp_path[++num_ftp] = file_iftp X } X } X X X next X X } X X X $1 == "P" { X X if ( NF != 18 ) X { X err( "Wrong number of fields for P entry" ) X next X } X X part_name = $2 X part_line = $3 X part_desc = $4 X part_src = $5 X part_cat = $6 X part_ftp = $7 X part_web = $8 X part_info = $9 X part_iftp = $10 X part_fhost = $11 X part_fdir = $12 X part_whost = $13 X part_wdir = $14 X part_gfhost = $15 X part_gfdir = $16 X part_gwhost = $17 X part_gwdir = $18 X X X part_ftp = gpath( "F", part_fhost, part_gfhost, X part_fdir, part_gfdir, part_ftp ) X X part_web = gpath( "H", part_whost, part_gwhost, X part_wdir, part_gwdir, part_web ) X X if ( length( part_web ) ) X { X if ( length( part_ftp ) ) X { X print part_web "\t" part_ftp X X web_path[++num_web] = part_web X ftp_path[++num_ftp] = part_ftp X } X else X { X print part_web "\t" "NOFTP" X X web_path[++num_web] = part_web X } X } X else X { X if ( length( part_ftp ) ) X { X print "NOWEB" "\t" part_ftp X X ftp_path[++num_ftp] = part_ftp X } X } X X X part_iftp = gpath( "F", part_fhost, part_gfhost, X part_fdir, part_gfdir, part_iftp ) X X part_info = gpath( "H", part_whost, part_gwhost, X part_wdir, part_gwdir, part_info ) X X if ( length( part_info ) ) X { X if ( length( part_iftp ) ) X { X print part_info "\t" part_iftp X X web_path[++num_web] = part_info X ftp_path[++num_ftp] = part_iftp X } X else X { X print part_info "\t" "NOFTP" X X web_path[++num_web] = part_info X } X } X else X { X if ( length( part_iftp ) ) X { X print "NOWEB" "\t" part_iftp X X ftp_path[++num_ftp] = part_iftp X } X } X X next X X } X X X $1 == "H" { X X if ( NF != 9 ) X { X err( "Wrong number of fields for H entry" ) X next X } X X cur_hide = $2 X hide_line = $3 X hide_ftp = $4 X hide_web = $5 X hide_fhost = $6 X hide_fdir = $7 X hide_whost = $8 X hide_wdir = $9 X X hide_ftp = path( "F", hide_fhost, hide_fdir, hide_ftp ) X hide_web = path( "H", hide_whost, hide_wdir, hide_web ) X X X if ( length( hide_ftp ) ) X { X for ( i = 1; i <= num_nosf; ++i ) X { X if ( hide_ftp == nosf_path[i] ) X err( "Duplicate HIDDEN FTP file: " hide_ftp ) X } X X nosf_path[++num_nosf] = hide_ftp X nosf_line[num_nosf] = hide_line X } X X if ( length( hide_web ) ) X { X for ( i = 1; i <= num_nosw; ++i ) X { X if ( hide_web == nosw_path[i] ) X err( "Duplicate HIDDEN Web file: " hide_web ) X } X X nosw_path[++num_nosw] = hide_web X nosw_line[num_nosw] = hide_line X X print hide_web "\t" "NOSERVE" X } X X next X X } X X X { X err( "Illegal table entry type" ) X } X X X END { X X for ( i = 1; i <= num_nosf; ++i ) X { X for ( j = 1; j <= num_ftp; ++j ) X { X if ( nosf_path[i] == ftp_path[j] ) X errl( nosf_line[i], X "FTP file also listed as HIDDEN: " nosf_path[i] ) X } X } X X for ( i = 1; i <= num_nosw; ++i ) X { X for ( j = 1; j <= num_web; ++j ) X { X if ( nosw_path[i] == web_path[j] ) X errl( nosw_line[i], X "Web file also listed as HIDDEN: " nosw_path[i] ) X } X } X X exit errors X X } X X X# X# Function to construct a full pathname X# X Xfunction path( protocol, host, dir, file ) { X X if ( length( file ) == 0 ) return "" X X if ( protocol ~ /[Ff]/ ) X { X if ( file ~ /[Ff][Tt][Pp]:/ ) return "" X if ( length( host ) && host != "ftp.iiug.org" ) return "" X } X else X { X if ( file ~ /[Hh][Tt][Tt][Pp]:/ ) return "" X if ( length( host ) && host != "www.iiug.org" ) return "" X } X X if ( file !~ /^\// && length( dir ) ) X { X file = dir ( ( dir !~ /\/$/ ) ? "/" : "" ) file X } X X if ( protocol ~ /[Ff]/ ) X { X file = ftp_home \ X ( ( ftp_home !~ /\/$/ && file !~ /^\// ) ? "/" : "" ) file X } X else X { X file = web_home \ X ( ( web_home !~ /\/$/ && file !~ /^\// ) ? "/" : "" ) file X } X X return file X X } X X X# X# Function to construct a full pathname for use within a GROUP X# X Xfunction gpath( protocol, host, ghost, dir, gdir, file ) { X X return path( protocol, X ( length( ghost ) ? ghost : host ), X ( length( gdir ) ? gdir : dir ), X file ) X X } X X X# X# Function to print an error message X# X Xfunction err( msg ) { X X #print FILENAME ", " NR ": " msg X X system( "echo \"" FILENAME ", " NR ": " msg "\" 1>&2" ) X X ++errors X X } X X X# X# Function to print an error message X# X Xfunction errl( line, msg ) { X X system( "echo \"" FILENAME ", " line ": " msg "\" 1>&2" ) X X ++errors X X } X X ' $* SHAR_EOF if [ `wc -c < mk_filelist.sh` -ne 8762 ] then echo "Lengths do not match -- Bad Copy of mk_filelist.sh" fi echo "Extracting file mk_html.sh" sed -e 's/^X//' <<\SHAR_EOF > mk_html.sh X#!/bin/sh X# X# mk_html.sh X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_html.sh [-f] index_data_file X# X# or: mk_index.sh source_file | mk_html.sh [-f] X# X# X# where: -f generate FTP links only X# X# X# Index File Record Types: X# X# C Category keyword definition X# S Source keyword definition X# F Individual File entry X# G Group header entry X# GD Group description line entry X# P Group Part entry X# L Link entry X# H Hidden file entry X# X# X# Assumes order of index is keywords, files, groups, links, hidden entries. X# X# X# The HTML generated by this script has a set of letter links at the X# top of the page that point to the first entry in the Files Section that X# begins with each respective letter. X# X# This script generates a tag in front of each file name that X# starts with a new letter of the alphabet. This of course assumes that X# the file entries are listed in the configuration file in alphabetical X# order. X# X# By convention, individual file entries are in fact in alphabetical order, X# except for a few special files that need to be at the top of the listing X# such as "ls-lR", "INDEX", etc.. To insure that they will be visible if X# the user clicks the "A" link, the "A" anchor tag is explicitly placed at X# the top the Files listing. X# X# We then need some mechanism for recognizing when the special files end X# and the normal alphabetical list of files begins. We could get really X# fancy here, but the simplest solution is to code this script based on X# the assumption that there will be at least one normal entry that starts X# with the letter "A" that follows the initial group of special entries. X# This is a pretty safe assumption given the size of the Repository. X# X# To be very picky, this list is in ASCII order, not merely alphabetical X# order, since there are a few entries with names that start with a digit. X# However, the above scheme still works so long as the digit entries X# precede the "A" entries. X# X# X# SCCS ID: @(#) mk_html.sh 1.15 10/10/02 16:52:00 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XTAB=`/usr/bin/echo '\t\c'` X X Xif [ "$1" = "-f" ] Xthen X FTP_ONLY='1' X shift Xelse X FTP_ONLY='0' Xfi X X Xnawk -F"$TAB" -v ftponly=$FTP_ONLY ' X X BEGIN { X X locase = "abcdefghijklmnopqrstuvwxyz" X upcase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" X X td = "" X X num_keyw = 0 X X cur_section = "" X cur_ltr = "~" # must be initialized to highest character X } X X X $1 == "C" || $1 == "S" { X X if ( NF != 4 ) X { X err( "Wrong number of fields (" NF ") for C or S entry" ) X next X } X X for ( i = 1; i <= num_keyw; ++i ) X { X if ( keywd[i] == $2 ) next X } X X if ( cur_section != "K" ) new_section( "K" ) X X cur_keywd = $2 X X keywd[++num_keyw] = $2 X keyw_desc[cur_keywd] = $4 X X next X X } X X X $1 == "F" { X X if ( NF != 14 ) X { X err( "Wrong number of fields (" NF ") for F entry" ) X next X } X X if ( cur_section != "F" ) new_section( "F" ) X X cur_file = $2 X file_line = $3 X file_desc = $4 X file_src = $5 X file_cat = $6 X file_ftp = $7 X file_web = $8 X file_info = $9 X file_iftp = $10 X file_fhost = $11 X file_fdir = $12 X file_whost = $13 X file_wdir = $14 X X if ( file_src == "NONE" ) file_src = "" X if ( file_cat == "NONE" ) file_cat = "" X X X # X # Set index letter. X # X # The first anchor is set by the code that does the heading for the X # Individual Files section so that it will come before the special File X # entries like "ls-lR", "INDEX" and those entries starting with a digit. X # X # For the code below to work, there must be at least one File entry X # that starts with "A" after the initial group of special files. If X # there is not such an entry, change the first IF statement below to X # read: X # X # if ( letter == "?" && cur_ltr == "~" ) cur_ltr = "A" X # X # where the "?" is replaced by the first letter of the first entry X # that starts the normal ordered list. X # X X letter = upshift( substr( cur_file, 1, 1 ) ) X X if ( letter == "A" && cur_ltr == "~" ) cur_ltr = "A" X X if ( letter >= "A" && letter <= "Z" && letter > cur_ltr && cur_ltr != "Z" ) X { X print "" X print "" X print td " " X print td " " X print td " " X print td " " X print "" X X cur_ltr = letter X } X else X { X anchor = "" X } X X X if ( length( file_src) || length( file_cat ) ) X { X keywds = fix_kwds( file_src " " file_cat, file_line ) X X keywds = " [" keywds "]" X } X else X { X keywds = "" X } X X X print "" X print "" X print td "" cur_file "" X X print td ( length(file_desc) ? file_desc : " " ) \ X ( length(keywds) ? keywds : " " ) \ X "" X X X if ( length( file_ftp ) ) X { X file_ftp = url( "f", file_fhost, file_fdir, file_ftp ) X X print td "Download" X } X else X { X print td " " X } X X if ( ftponly == 0 ) X { X if ( length( file_web ) ) X { X file_web = url( "h", file_whost, file_wdir, file_web ) X X print td "View" X } X else X { X if ( length( file_info ) ) X { X file_info = url( "h", file_whost, file_wdir, file_info ) X X print td "Info" X } X else X { X print td " " X } X } X } X X print "" X X next X X } X X X $1 == "G" { X X if ( NF != 16 ) X { X err( "Wrong number of fields for G entry" ) X next X } X X if ( cur_section != "G" ) new_section( "G" ) X X cur_group = $2 X group_line = $3 X group_ftp = $4 X group_cat = $5 X group_src = $6 X group_fhost = $7 X group_fdir = $8 X group_whost = $9 X group_wdir = $10 X group_gfhost = $11 X group_gfdir = $12 X group_gwhost = $13 X group_gwdir = $14 X group_ndesc = $15 X group_npart = $16 X X if ( group_src == "NONE" ) group_src = "" X if ( group_cat == "NONE" ) group_cat = "" X X X if ( length( group_src) || length( group_cat ) ) X { X keywds = fix_kwds( group_src " " group_cat, group_line ) X X keywds = " [" keywds "]" X } X else X { X keywds = "" X } X X X print "" X print "
    " X X if ( length( group_ftp ) ) X { X group_ftp = gurl( "f", group_fhost, group_gfhost, X group_fdir, group_gfdir, group_ftp ) X print "" cur_group "
    " X } X else X { X print cur_group "" X } X X if ( group_ndesc || group_npart ) print "
    " X X #if ( group_ndesc == 0 && length( group_src ) ) print " " group_src X X part_num = 0 X X next X X } X X X $1 == "GD" { X X if ( NF != 3 ) X { X err( "Wrong number of fields for GD entry" ) X next X } X X group_desc = $2 X group_dlin = $3 X X print " " group_desc X X if ( --group_ndesc == 0 ) X { X print " " keywds X X if ( group_npart == 0 ) print "

    " X } X X next X X } X X X $1 == "P" { X X if ( NF != 18 ) X { X err( "Wrong number of fields for P entry" ) X next X } X X part_name = $2 X part_line = $3 X part_desc = $4 X part_src = $5 X part_cat = $6 X part_ftp = $7 X part_web = $8 X part_info = $9 X part_iftp = $10 X part_fhost = $11 X part_fdir = $12 X part_whost = $13 X part_wdir = $14 X part_gfhost = $15 X part_gfdir = $16 X part_gwhost = $17 X part_gwdir = $18 X X if ( part_src == "NONE" ) part_src = "" X if ( part_cat == "NONE" ) part_cat = "" X X X if ( length( part_src) || length( part_cat ) ) X { X keywds = fix_kwds( part_src " " part_cat, part_line ) X X keywds = " [" keywds "]" X } X else X { X keywds = "" X } X X X if ( part_num == 0 ) X { X print "" X print " " X } X X ++part_num X X print "" X print " " X print " " td "" part_name "" X X print " " td ( length(part_desc) ? part_desc : " " ) \ X ( length(keywds) ? keywds : " " ) \ X "" X X X if ( length( part_ftp ) ) X { X part_ftp = gurl( "f", part_fhost, part_gfhost, X part_fdir, part_gfdir, part_ftp ) X X print " " td "Download" X } X else X { X print " " td " " X } X X X if ( ftponly == 0 ) X { X if ( length( part_web ) ) X { X part_web = gurl( "h", part_whost, part_gwhost, X part_wdir, part_gwdir, part_web ) X X print " " td "View" X } X else X { X if ( length( part_info ) ) X { X part_info = gurl( "h", part_whost, part_gwhost, X part_wdir, part_gwdir, part_info ) X X print " " td "Info" X } X else X { X print " " td " " X } X } X } X X X print " " X X X if ( --group_npart == 0 ) X { X print "" X print "
    " X print "

    " X } X X X next X X } X X X $1 == "L" { X X if ( NF != 7 ) X { X err( "Wrong number of fields for L entry" ) X next X } X X if ( cur_section != "L" ) new_section( "L" ) X X cur_link = $2 X link_line = $3 X link_desc = $4 X link_src = $5 X link_cat = $6 X link_url = $7 X X if ( link_src == "NONE" ) link_src = "" X if ( link_cat == "NONE" ) link_cat = "" X X X if ( length( link_src) || length( link_cat ) ) X { X keywds = fix_kwds( link_src " " link_cat, link_line ) X X keywds = " [" keywds "]" X } X else X { X keywds = "" X } X X X print "" X print "

  • " cur_link "" X X print " " link_desc keywds "
  • " X X next X X } X X X $1 == "H" { X X if ( NF != 9 ) err( "Wrong number of fields for H entry" ) X X cur_hide = $2 X hide_line = $3 X hide_ftp = $4 X hide_web = $5 X hide_fhost = $6 X hide_fdir = $7 X hide_whost = $8 X hide_wdir = $9 X X next X X } X X X { X err( "Illegal index entry type" ) X } X X X END { X X new_section( "E" ) X X exit X X } X X X# X# Function to process moving from one section to the next X# X# Assumes order of index is keywords, files, groups, links, hidden entries. X# X Xfunction new_section( new_section ) { X X if ( cur_section == "" ) page_header() X else if ( cur_section == "K" ) keyword_footer() X else if ( cur_section == "F" ) file_footer() X else if ( cur_section == "G" ) group_footer() X else if ( cur_section == "L" ) link_footer() X X if ( new_section == "K" ) keyword_header() X else if ( new_section == "F" ) file_header() X else if ( new_section == "G" ) group_header() X else if ( new_section == "L" ) link_header() X else page_footer() X X cur_section = new_section X X } X X X# X# Function to print page header -- Currently handled by Makefile X# X Xfunction page_header() { X X #print "" X #print "" X #print "" X X } X X X# X# Function to print Keyword section header X# X Xfunction keyword_header() { X X print "

    Keywords

    " X print "" X print "

    Many entries have one or more keywords attached to them that" X print "indicate the general category of software and/or the source" X print "language(s) used. The keywords used in this index are:" X print "

    " X print "" X print "" X print "" X print "" X X } X X X# X# Function to print Keyword section footer X# X Xfunction keyword_footer( i, j, tmpkwd ) { X X for ( i = 1; i < num_keyw; ++i ) X { X for ( j = i+1; j <= num_keyw; ++j ) X { X if ( keywd[i] > keywd[j] ) X { X tmpkwd = keywd[i] X keywd[i] = keywd[j] X keywd[j] = tmpkwd X } X } X } X X for ( i = 1; i <= num_keyw; ++i ) X { X print "" X print "" X X print td "" \ X keywd[i] "" X X print td "" \ X "   " X X print td "" \ X keyw_desc[keywd[i]] "" X X print "" X } X X print "" X print "
    " X print "
    " X print "
    " X print "
    " X print "" X print "" X X } X X X# X# Function to print File section header X# X Xfunction file_header() { X X print "" X X print "

    Individual Files

    " X print "" X print "" X X } X X X# X# Function to print File section footer X# X Xfunction file_footer() { X X print "" X print "
    " X print "
    " X print "" X print "" X X } X X X# X# Function to print Group section header X# X Xfunction group_header() { X X print "" X X print "

    Multi-File Collections

    " X print "" X print "
    " X X } X X X# X# Function to print Group section footer X# X Xfunction group_footer() { X X print "" X print "
    " X print "
    " X print "" X print "" X X } X X X# X# Function to print Other Links section header X# X Xfunction link_header() { X X print "" X X print "

    Other Sources for Software

    " X print "" X print "

    This section contains links to other sources for software. To" X print "be listed in this section, software must be of broad applicability" X print "in an Informix enviroment, such as database development and" X print "management utilities or general purpose end-user tools. It must" X print "also be open source or freeware, or must have a free demo or" X print "evaluation version available.

    " X print "" X X print "
      " X X } X X X# X# Function to print Other Links section footer X# X Xfunction link_footer() { X X print "" X print "

      " X print "" X X if ( system( "cat Other_links" ) ) exit 1 X X print "" X print "

    " X print "
    " X print "" X print "" X X } X X X# X# Function to print page footer -- Currently handled by Makefile X# X Xfunction page_footer() { X X #print "" X #print "" X #print "" X X } X X X# X# Function to construct a full URL X# X# Rules: X# X# If file starts with protocol ("ftp:", "http:"), use file, else X# build URL that consists of host part followed by pathname part. X# X# To build pathname part: If file starts with "/" or directory is X# blank, use just file, else concatenate directory and file. Add X# a "/" between the two if necessary. X# X# To build host part: If host is blank, do not use it. This could X# cause problems with FTP. If host is non-blank, prepend protocol X# if it does not start with it already, then concatenate host and X# pathname part. Add a "/" between the two if necessary. X# X Xfunction url( protocol, host, dir, file ) { X X if ( protocol ~ /[Ff]/ ) X { X if ( file ~ /[Ff][Tt][Pp]:/ ) return file X } X else X { X if ( file ~ /[Hh][Tt][Tt][Pp]:/ ) return file X } X X if ( file !~ /^\// && length( dir ) ) X { X file = dir ( ( dir !~ /\/$/ ) ? "/" : "" ) file X } X X if ( length( host ) ) X { X if ( protocol ~ /[Ff]/ ) X { X if ( host !~ /[Ff][Tt][Pp]:/ ) host = "ftp://" host X } X else X { X if ( file !~ /[Hh][Tt][Tt][Pp]:/ ) host = "http://" host X } X X file = host ( ( host !~ /\/$/ && file !~ /^\// ) ? "/" : "" ) file X } X X return file X X } X X X# X# Function to construct a full URL for use within a GROUP X# X Xfunction gurl( protocol, host, ghost, dir, gdir, file ) { X X #if ( length( ghost ) ) host = ghost X #if ( length( gdir ) ) dir = gdir X X #return url( protocol, host, dir, file ) X X return url( protocol, X ( length( ghost ) ? ghost : host ), X ( length( gdir ) ? gdir : dir ), X file ) X X } X X X# X# Function to clean up and format a sring of category or source keywords X# X Xfunction fix_kwds( kwds, line, num, num_pack, arr, i, j, min_idx, min_val ) { X X gsub( ",", " " ) # replace commas with blanks X #gsub( "([ \t])+", " " ) # compress whitespace X X kwds = upshift( kwds ) # force to upper case X X num = split( kwds, arr, " " ) # split keywords into an array X X if ( num == 0 ) return "" # return if there are no keywords X X X # X # Sort keywords and eliminate duplicates if more than one X # X X if ( num > 1 ) X { X for ( i = 1; i < num; ++i ) X { X min_idx = i X min_val = arr[i] X X for ( j = i+1; j <= num; ++j ) X { X if ( arr[j] < min_val ) X { X min_idx = j X min_val = arr[j] X } X } X X if ( min_idx != i ) X { X arr[min_idx] = arr[i] X arr[i] = min_val X } X } X X num_pack = 1 X X for ( i = 2; i <= num; ++i ) X { X if ( arr[i] != arr[num_pack] ) X if ( ++num_pack != i ) arr[num_pack] = arr[i] X } X X num = num_pack X } X X for ( i = 1; i <= num; ++i ) X { X for ( j = 1; j <= num_keyw; ++j ) X { X if ( arr[i] == keywd[j] ) break X } X X if ( j > num_keyw ) errl( line, "Undefined KEYWORD: " arr[i] ) X } X X kwds = arr[1] X X for ( i = 2; i <= num; ++i ) X { X kwds = kwds ", " arr[i] X } X X return kwds X X } X X X# X# Function to print an error message X# X Xfunction err( msg ) { X X errl( NR, msg ) X X } X X X# X# Function to print an error message X# X Xfunction errl( line, msg ) { X X #print FILENAME ", " NR ": " msg X X system( "echo \"" FILENAME ", " line ": " msg "\" 1>&2" ) X X ++errors X X } X X X# X# Function to force letters of a string to upper case X# X Xfunction upshift( str, xstr, xc, i, j ) { X X xstr = "" X X for ( i = 1; i <= length( str ); ++i ) X { X xc = substr( str, i, 1 ) X X if ( ( j = index( locase, xc ) ) ) xstr = xstr substr( upcase, j, 1 ) X else xstr = xstr xc X } X X return xstr X X } X X ' $* SHAR_EOF if [ `wc -c < mk_html.sh` -ne 19288 ] then echo "Lengths do not match -- Bad Copy of mk_html.sh" fi echo "Extracting file mk_index.sh" sed -e 's/^X//' <<\SHAR_EOF > mk_index.sh X#!/bin/sh X# X# mk_index.sh Make index file from Repository configuration file X# X# X# Usage: mk_index.sh [configuration_source_file] > index_data_file X# X# X# SCCS ID: @(#) mk_index.sh 1.16 10/10/02 16:52:00 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X Xnawk ' X X BEGIN { X X cur_type = "" X X web_host = "" X ftp_host = "" X X web_dir = "" X ftp_dir = "" X X group_web_host = "" X group_ftp_host = "" X X group_web_dir = "" X group_ftp_dir = "" X X num_src = 0 X num_cat = 0 X #num_keyw = 0 X num_file = 0 X num_link = 0 X num_group = 0 X num_part = 0 X num_hide = 0 X X errors = 0 X X locase = "abcdefghijklmnopqrstuvwxyz" X upcase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" X } X X X $1 ~ /^#/ { next } # skip comment lines X X { X sub( "^([ \t])*", "" ) # strip leading whitespace X sub( "([ \t])*$", "" ) # strip trailing whitespace X gsub( "[\t]", " " ) # replace tabs with blanks X } X X /^$/ { next } # skip blank lines X X X# X# In an earlier version, KEYWD: lines were used to define valid Source and X# Category keywords. This functionality was replaced by having separate X# lists for the two types of keywords. Valid Source and Category keywords X# are now defined by placing SRC: and CAT: lines in the configuration file X# prior to any File, Group or Link listings. This section has been kept X# for possible future use. 09/09/1999 WH. X# X## X## KW / KEYW / KEYWD / KEYWORD X## X# X# /^[Kk][Ee][Yy][Ww][Oo][Rr][Dd]/ { X# sub( "[Kk][Ee][Yy][Ww][Oo][Rr][Dd]", "KW" ) } X# /^[Kk][Ee][Yy][Ww][Dd]/ { sub( "[Kk][Ee][Yy][Ww][Dd]", "KW" ) } X# /^[Kk][Ee][Yy][Ww]/ { sub( "[Kk][Ee][Yy][Ww]", "KW" ) } X# X# X# /^[Kk][Ww][:= \t]/ { X# X# sub( "[Kk][Ww]", "" ) X# cleanbol() X# X# if ( length( $0 ) == 0 ) X# { X# err( "Missing KEYWORD" ) X# next X# } X# X# for ( i = 1; i <= num_keyw; ++i ) X# { X# if ( keywd[i] == $1 ) X# { X# err( "KEYWORD \"" $1 \ X# "\" on line " keyw_line[keywd[i]] " DUPLICATED" ) X# next X# } X# } X# X# cur_keywd = $1 X# X# keywd[++num_keyw] = $1 X# X# sub( $1, "" ) X# cleanbol() X# X# if ( length( $0 ) == 0 ) err( "Missing KEYWORD Description" ) X# X# keyw_desc[cur_keywd] = $0 X# keyw_line[cur_keywd] = NR X# X# next X# X# } X X X# X# WEB_HOST X# X X /^[Ww][Ee][Bb][ _-][Hh][Oo][Ss][Tt][:= \t]/ { X X sub( "[Ww][Ee][Bb][ _-][Hh][Oo][Ss][Tt]", "" ) X cleanbol() X X web_host = $0 X X next X } X X X# X# WEB_DIR X# X X /^[Ww][Ee][Bb][ _-][Dd][Ii][Rr][:= \t]/ { X X sub( "[Ww][Ee][Bb][ _-][Dd][Ii][Rr]", "" ) X cleanbol() X X web_dir = $0 X X next X } X X X# X# GROUP_WEB_HOST X# X X /^[Gg][Rr][Oo][Uu][Pp][ _-][Ww][Ee][Bb][ _-][Hh][Oo][Ss][Tt][:= \t]/ { X X sub( "[Gg][Rr][Oo][Uu][Pp][ _-][Ww][Ee][Bb][ _-][Hh][Oo][Ss][Tt]", "" ) X cleanbol() X X group_web_host = $0 X X next X } X X X# X# GROUP_WEB_DIR X# X X /^[Gg][Rr][Oo][Uu][Pp][ _-][Ww][Ee][Bb][ _-][Dd][Ii][Rr][:= \t]/ { X X sub( "[Gg][Rr][Oo][Uu][Pp][ _-][Ww][Ee][Bb][ _-][Dd][Ii][Rr]", "" ) X cleanbol() X X group_web_dir = $0 X X next X } X X X# X# FTP_HOST X# X X /^[Ff][Tt][Pp][ _-][Hh][Oo][Ss][Tt][:= \t]/ { X X sub( "[Ff][Tt][Pp][ _-][Hh][Oo][Ss][Tt]", "" ) X cleanbol() X X ftp_host = $0 X X next X } X X X# X# GROUP_FTP_HOST X# X X /^[Gg][Rr][Oo][Uu][Pp][ _-][Ff][Tt][Pp][ _-][Hh][Oo][Ss][Tt][:= \t]/ { X X sub( "[Gg][Rr][Oo][Uu][Pp][ _-][Ff][Tt][Pp][ _-][Hh][Oo][Ss][Tt]", "" ) X cleanbol() X X group_ftp_host = $0 X X next X } X X X# X# FTP_DIR X# X X /^[Ff][Tt][Pp][ _-][Dd][Ii][Rr][:= \t]/ { X X sub( "[Ff][Tt][Pp][ _-][Dd][Ii][Rr]", "" ) X cleanbol() X X ftp_dir = $0 X X next X } X X X# X# GROUP_FTP_DIR X# X X /^[Gg][Rr][Oo][Uu][Pp][ _-][Ff][Tt][Pp][ _-][Dd][Ii][Rr][:= \t]/ { X X sub( "[Gg][Rr][Oo][Uu][Pp][ _-][Ff][Tt][Pp][ _-][Dd][Ii][Rr]", "" ) X cleanbol() X X group_ftp_dir = $0 X X next X } X X X# X# FILE X# X X /^[Ff][Ii][Ll][Ee][:= \t]/ { X X cur_type = "F" X X sub( "[Ff][Ii][Ll][Ee]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing FILE name" ) X next X } X X for ( i = 1; i <= num_file; ++i ) X { X if ( file_name[i] == $0 ) X err( "FILE \"" $0 \ X "\" on line " file_line[file_name[i]] " DUPLICATED" ) X } X X cur_file = $0 X X file_name[++num_file] = cur_file X X file_desc[cur_file] = "" X file_src[cur_file] = "" X file_cat[cur_file] = "" X X file_ftp[cur_file] = "" X file_web[cur_file] = "" X file_info[cur_file] = "" X file_iftp[cur_file] = "" X X file_fhost[cur_file] = ftp_host X file_fdir[cur_file] = ftp_dir X file_whost[cur_file] = web_host X file_wdir[cur_file] = web_dir X file_line[cur_file] = NR X X next X } X X X# X# LINK X# X X /^[Ll][Ii][Nn][Kk][:= \t]/ { X X cur_type = "L" X X sub( "[Ll][Ii][Nn][Kk]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing LINK text" ) X next X } X X X cur_link = $0 X X link_name[++num_link] = cur_link X X link_cat[cur_link] = "" X link_desc[cur_link] = "" X link_src[cur_link] = "" X link_url[cur_link] = "" X link_line[cur_link] = NR X X next X } X X X# X# GROUP X# X X /^[Gg][Rr][Oo][Uu][Pp]/ { sub( "[Gg][Rr][Oo][Uu][Pp]", "GRP" ) } X X X /^[Gg][Rr][Pp][:= \t]/ { X X cur_type = "G" X X sub( "[Gg][Rr][Pp]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing GROUP name" ) X next X } X X X for ( i = 1; i <= num_group; ++i ) X { X if ( group_name[i] == $0 ) X err( "GROUP \"" $0 \ X "\" on line " group_line[group_name[i]] " DUPLICATED" ) X } X X cur_group = $0 X X group_name[++num_group] = cur_group X X group_ftp[cur_group] = "" X group_src[cur_group] = "" X group_cat[cur_group] = "" X X group_fhost[cur_group] = ftp_host X group_fdir[cur_group] = ftp_dir X group_whost[cur_group] = web_host X group_wdir[cur_group] = web_dir X group_gfhost[cur_group] = group_ftp_host X group_gfdir[cur_group] = group_ftp_dir X group_gwhost[cur_group] = group_web_host X group_gwdir[cur_group] = group_web_dir X group_line[cur_group] = NR X X group_nd[cur_group] = 0 X group_np[cur_group] = 0 X num_part = 0 X X next X } X X X# X# PART X# X X /^[Pp][Aa][Rr][Tt][:= \t]/ { X X if ( cur_type !~ "[GP]" ) X { X err( "PART entry outside of a Group" ) X next X } X X cur_type = "P" X X sub( "[Pp][Aa][Rr][Tt]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing PART name" ) X next X } X X X for ( i = 1; i <= num_part; ++i ) X { X if ( part_name[cur_group, i] == $0 ) X err( "PART \"" $0 "\" on line " part_line[cur_group, i] \ X " DUPLICATED within GROUP \"" cur_group "\"" ) X } X X group_np[cur_group] = ++num_part X X part_name[cur_group, num_part] = $0 X part_desc[cur_group, num_part] = "" X part_src[cur_group, num_part] = "" X part_cat[cur_group, num_part] = "" X X part_ftp[cur_group, num_part] = "" X part_web[cur_group, num_part] = "" X part_info[cur_group, num_part] = "" X part_iftp[cur_group, num_part] = "" X X part_fhost[cur_group, num_part] = ftp_host X part_fdir[cur_group, num_part] = ftp_dir X part_whost[cur_group, num_part] = web_host X part_wdir[cur_group, num_part] = web_dir X part_gfhost[cur_group, num_part] = group_ftp_host X part_gfdir[cur_group, num_part] = group_ftp_dir X part_gwhost[cur_group, num_part] = group_web_host X part_gwdir[cur_group, num_part] = group_web_dir X X part_line[cur_group, num_part] = NR X X next X } X X X# X# HIDE / HIDDEN X# X X /^[Hh][Ii][Dd][Dd][Ee][Nn]/ { sub( "[Hh][Ii][Dd][Dd][Ee][Nn]", "HIDE" ) } X X X /^[Hh][Ii][Dd][Ee][:= \t]/ { X X cur_type = "H" X X sub( "[Hh][Ii][Dd][Ee]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing HIDDEN file name" ) X next X } X X X for ( i = 1; i <= num_hide; ++i ) X { X if ( hide_name[i] == $0 ) X err( "HIDDEN name \"" $0 \ X "\" on line " hide_line[hide_name[i]] " DUPLICATED" ) X } X X cur_hide = $0 X X hide_name[++num_hide] = cur_hide X X hide_ftp[cur_hide] = "" X hide_web[cur_hide] = "" X hide_info[cur_hide] = "" X hide_iftp[cur_hide] = "" X X hide_fhost[cur_hide] = ftp_host X hide_fdir[cur_hide] = ftp_dir X hide_whost[cur_hide] = web_host X hide_wdir[cur_hide] = web_dir X X hide_line[cur_hide] = NR X X next X } X X X# X# CAT / CATEGORY X# X X /^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]/ { X X sub( "[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]", "CAT" ) X } X X X /^[Cc][Aa][Tt][:= \t]/ { X X if ( cur_type == "H" ) X { X err( "Category not allowed for a HIDDEN file" ) X next X } X X X sub( "[Cc][Aa][Tt]", "" ) X cleanbol() X X X if ( cur_type == "" ) X { X if ( length( $0 ) == 0 ) X { X err( "Missing CATEGORY KEYWORD name" ) X next X } X X cur_cat = upshift( $1 ) X X if ( cur_cat == "NONE" ) X { X err( "Reserved keyword 'NONE' may not define a CATEGORY" ) X next X } X X for ( i = 1; i <= num_cat; ++i ) X { X if ( cat[i] == $1 ) X { X err( "CATEGORY \"" cur_cat \ X "\" on line " cat_line[cat[i]] " DUPLICATED" ) X next X } X } X X cat[++num_cat] = cur_cat X X sub( cur_cat, "" ) X cleanbol() X X if ( length( $0 ) == 0 ) err( "Missing CATEGORY Description" ) X X cat_desc[cur_cat] = $0 X cat_line[cur_cat] = NR X X next X } X X X if ( length( $0 ) == 0 ) X { X err( "Missing Category(ies)" ) X next X } X X X gsub( ",", " " ) # replace commas with blanks X gsub( "([ \t])+", " " ) # compress whitespace X X cur_cat = $0 X X if ( cur_type == "F" ) X { X if ( length( file_cat[cur_file] ) ) X cur_cat = file_cat[cur_file] " " cur_cat X X file_cat[cur_file] = cur_cat X } X else X { X if ( cur_type == "L" ) X { X if ( length( link_cat[cur_link] ) ) X cur_cat = link_cat[cur_link] " " cur_cat X X link_cat[cur_link] = cur_cat X } X else X { X if ( cur_type == "G" ) X { X if ( length( group_cat[cur_group] ) ) X cur_cat = group_cat[cur_group] " " cur_cat X X group_cat[cur_group] = cur_cat X } X else X { X # cur_type == "P" X X if ( length( part_cat[cur_group, num_part] ) ) X cur_cat = part_cat[cur_group, num_part] " " cur_cat X X part_cat[cur_group, num_part] = cur_cat X } X } X } X X next X } X X X# X# DESC / DESCRIPTION X# X X /^[Dd][Ee][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn]/ { X X sub( "[Dd][Ee][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn]", "DESC" ) X } X X X /^[Dd][Ee][Ss][Cc][:= \t]/ { X X if ( cur_type == "" ) X { X err( "First entry must be FILE, GROUP, LINK or HIDE" ) X next X } X X if ( cur_type == "H" ) X { X err( "Description not allowed for a HIDDEN file" ) X next X } X X X sub( "[Dd][Ee][Ss][Cc]", "" ) X cleanbol() X X if ( length( $0 ) == 0 && cur_type != "G" ) X { X err( "Missing Description" ) X next X } X X X desc = $0 X X if ( cur_type == "F" ) X { X if ( length( file_desc[cur_file] ) ) X desc = file_desc[cur_file] " " desc X X file_desc[cur_file] = desc X } X else X { X if ( cur_type == "L" ) X { X if ( length( link_desc[cur_link] ) ) X desc = link_desc[cur_link] " " desc X X link_desc[cur_link] = desc X } X else X { X if ( cur_type == "G" ) X { X ++group_nd[cur_group] X group_desc[cur_group, group_nd[cur_group]] = desc X group_dlin[cur_group, group_nd[cur_group]] = NR X } X else X { X # cur_type == "P" X X if ( length( part_desc[cur_group, num_part] ) ) X desc = part_desc[cur_group, num_part] " " desc X X part_desc[cur_group, num_part] = desc X } X } X } X X next X } X X X# X# FTP X# X X /^[Ff][Tt][Pp][:= \t]/ { X X if ( cur_type == "" ) X { X err( "First entry must be FILE, GROUP, LINK or HIDE" ) X next X } X X if ( cur_type == "L" ) X { X err( "FTP line not allowed for a LINK" ) X next X } X X X sub( "[Ff][Tt][Pp]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing FTP Path/File Name" ) X next X } X X X ftp = $0 X X if ( cur_type == "F" ) X { X if ( length( file_ftp[cur_file] ) ) X err( "Multiple FTP lines for FILE" ) X else X file_ftp[cur_file] = ftp X } X else X { X if ( cur_type == "G" ) X { X if ( length( group_ftp[cur_group] ) ) X err( "Multiple FTP lines for GROUP" ) X else X group_ftp[cur_group] = ftp X } X else X { X if ( cur_type == "P" ) X { X if ( length( part_ftp[cur_group, num_part] ) ) X err( "Multiple FTP lines for PART" ) X else X part_ftp[cur_group, num_part] = ftp X } X else X { X # cur_type == "H" X X if ( length( hide_ftp[cur_hide] ) ) X err( "Multiple FTP lines for HIDDEN file" ) X else X hide_ftp[cur_hide] = ftp X } X } X } X X next X } X X X# X# INFO X# X X /^[Ii][Nn][Ff][Oo][:= \t]/ { X X if ( cur_type == "" ) X { X err( "First entry must be FILE, GROUP, LINK or HIDE" ) X next X } X X if ( cur_type == "G" ) X { X err( "INFO not allowed for an entire GROUP" ) X next X } X X if ( cur_type == "L" ) X { X err( "INFO not allowed for a LINK" ) X next X } X X if ( cur_type == "H" ) X { X err( "INFO not allowed for a HIDDEN file" ) X next X } X X X sub( "[Ii][Nn][Ff][Oo]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing INFO Path/File Name" ) X next X } X X X info = $0 X X if ( cur_type == "F" ) X { X if ( length( file_web[cur_file] ) ) X err( "WEB and INFO lines for same FILE" ) X X if ( length( file_info[cur_file] ) ) X err( "Multiple INFO lines for FILE" ) X else X file_info[cur_file] = info X } X else X { X # cur_type == "P" X X if ( length( file_web[cur_group, num_part] ) ) X err( "WEB and INFO lines for same PART" ) X X if ( length( part_info[cur_group, num_part] ) ) X err( "Multiple INFO lines for PART" ) X else X part_info[cur_group, num_part] = info X } X X next X } X X X# X# IFTP X# X X /^[Ii][Ff][Tt][Pp][:= \t]/ { X X if ( cur_type == "" ) X { X err( "First entry must be FILE, GROUP, LINK or HIDE" ) X next X } X X if ( cur_type == "G" ) X { X err( "IFTP not allowed for an entire GROUP" ) X next X } X X if ( cur_type == "L" ) X { X err( "IFTP not allowed for a LINK" ) X next X } X X if ( cur_type == "H" ) X { X err( "IFTP not allowed for a HIDDEN file" ) X next X } X X X sub( "[Ii][Ff][Tt][Pp]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing IFTP Path/File Name" ) X next X } X X X iftp = $0 X X if ( cur_type == "F" ) X { X file_iftp[cur_file] = iftp X } X else X { X # cur_type == "P" X X part_iftp[cur_group, num_part] = iftp X } X X next X } X X X X# X# SRC / SOURCE X# X X /^[Ss][Oo][Uu][Rr][Cc][Ee]/ { sub( "[Ss][Oo][Uu][Rr][Cc][Ee]", "SRC" ) } X X /^[Ss][Rr][Cc][:= \t]/ { X X if ( cur_type == "H" ) X { X err( "Source keywords not allowed for a HIDDEN file" ) X next X } X X X sub( "[Ss][Rr][Cc]", "" ) X cleanbol() X X X if ( cur_type == "" ) X { X if ( length( $0 ) == 0 ) X { X err( "Missing SOURCE KEYWORD name" ) X next X } X X cur_src = upshift( $1 ) X X if ( cur_src == "NONE" ) X { X err( "Reserved keyword 'NONE' may not define a SOURCE type" ) X next X } X X for ( i = 1; i <= num_src; ++i ) X { X if ( src[i] == cur_src ) X { X err( "SOURCE KEYWORD \"" cur_src \ X "\" on line " src_line[src[i]] " DUPLICATED" ) X next X } X } X X src[++num_src] = cur_src X X sub( cur_src, "" ) X cleanbol() X X if ( length( $0 ) == 0 ) err( "Missing SOURCE KEYWORD Description" ) X X src_desc[cur_src] = $0 X src_line[cur_src] = NR X X next X } X X if ( length( $0 ) == 0 ) X { X err( "Missing SRC Keyword(s)" ) X next X } X X X gsub( ",", " " ) # replace commas with blanks X gsub( "([ \t])+", " " ) # compress whitespace X X cur_src = $0 X X if ( cur_type == "F" ) X { X if ( length( file_src[cur_file] ) ) X cur_src = file_src[cur_file] " " cur_src X X file_src[cur_file] = cur_src X } X else X { X if ( cur_type == "L" ) X { X if ( length( link_src[cur_link] ) ) X cur_src = link_src[cur_link] " " cur_src X X link_src[cur_link] = cur_src X } X else X { X if ( cur_type == "G" ) X { X if ( length( group_src[cur_group] ) ) X cur_src = group_src[cur_group] " " cur_src X X group_src[cur_group] = cur_src X } X else X { X # cur_type == "P" X X if ( length( part_src[cur_group, num_part] ) ) X cur_src = part_src[cur_group, num_part] " " cur_src X X part_src[cur_group, num_part] = cur_src X } X } X } X X next X } X X X# X# URL X# X X /^[Uu][Rr][Ll][:= \t]/ { X X if ( cur_type == "" ) X { X err( "First entry must be FILE, GROUP, LINK or HIDE" ) X next X } X X if ( cur_type != "L" ) X { X err( "URL allowed only with a LINK" ) X next X } X X X sub( "[Uu][Rr][Ll]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing URL Web location" ) X next X } X X X if ( length( link_url[cur_link] ) ) X err( "Multiple URL lines for LINK" ) X else X link_url[cur_link] = $0 X X next X } X X X# X# WEB / VIEW X# X X /^[Vv][Ii][Ee][Ww]/ { sub( "[Vv][Ii][Ee][Ww]", "WEB" ) } X X X /^[Ww][Ee][Bb][:= \t]/ { X X if ( cur_type == "" ) X { X err( "First entry must be FILE, GROUP, LINK or HIDE" ) X next X } X X if ( cur_type == "G" ) X { X err( "WEB/VIEW line not allowed for an entire GROUP" ) X next X } X X if ( cur_type == "L" ) X { X err( "WEB/VIEW line not allowed for a LINK" ) X next X } X X X sub( "[Ww][Ee][Bb]", "" ) X cleanbol() X X if ( length( $0 ) == 0 ) X { X err( "Missing WEB Path/File Name" ) X next X } X X X web = $0 X X if ( cur_type == "F" ) X { X if ( length( file_info[cur_file] ) ) X err( "WEB and INFO lines for same FILE" ) X X if ( length( file_web[cur_file] ) ) X err( "Multiple WEB lines for FILE" ) X else X file_web[cur_file] = web X } X else X { X if ( cur_type == "P" ) X { X if ( length( part_info[cur_group, num_part] ) ) X err( "WEB and INFO lines for same PART" ) X X if ( length( part_web[cur_group, num_part] ) ) X err( "Multiple WEB lines for PART" ) X else X part_web[cur_group, num_part] = web X } X else X { X # cur_type == "H" X X if ( length( hide_web[cur_hide] ) ) X err( "Multiple WEB lines for HIDDEN file" ) X else X hide_web[cur_hide] = web X } X } X X next X } X X X# X# Invalid line type X# X X { X err( "Invalid line type" ) X X } X X X# X# End of input file reached X# X# Entry sorts disabled for now. 09/09/1999 WH. X# X X END { X X #sort_cat() X #sort_src() X clean_keywords() X X if ( errors ) exit errors X X #sort_files_by_name() X #sort_groups_by_name() X #sort_hidden_by_name() X X OFS = "\t" X X X # X # Output Category Keyword definitions X # X X for ( i = 1; i <= num_cat; ++i ) X { X cur_cat = cat[i] X X print "C", X cur_cat, X cat_line[cur_cat], X cat_desc[cur_cat] X } X X X # X # Output Source Keyword definitions X # X X for ( i = 1; i <= num_src; ++i ) X { X cur_src = src[i] X X print "S", X cur_src, X src_line[cur_src], X src_desc[cur_src] X } X X X # X # Output normal file entries X # X X for ( i = 1; i <= num_file; ++i ) X { X cur_file = file_name[i] X X print "F", X cur_file, X file_line[cur_file], X file_desc[cur_file], X file_src[cur_file], X file_cat[cur_file], X file_ftp[cur_file], X file_web[cur_file], X file_info[cur_file], X file_iftp[cur_file], X file_fhost[cur_file], X file_fdir[cur_file], X file_whost[cur_file], X file_wdir[cur_file] X } X X X # X # Output group entries X # X X for ( i = 1; i <= num_group; ++i ) X { X cur_group = group_name[i] X X print "G", X cur_group, X group_line[cur_group], X group_ftp[cur_group], X group_cat[cur_group], X group_src[cur_group], X group_fhost[cur_group], X group_fdir[cur_group], X group_whost[cur_group], X group_wdir[cur_group], X group_gfhost[cur_group], X group_gfdir[cur_group], X group_gwhost[cur_group], X group_gwdir[cur_group], X group_nd[cur_group], X group_np[cur_group] X X for ( j = 1; j <= group_nd[cur_group]; ++j ) X { X print "GD", X group_desc[cur_group, j], X group_dlin[cur_group, j] X } X X for ( j = 1; j <= group_np[cur_group]; ++j ) X { X print "P", X part_name[cur_group, j], X part_line[cur_group, j], X part_desc[cur_group, j], X part_src[cur_group, j], X part_cat[cur_group, j], X part_ftp[cur_group, j], X part_web[cur_group, j], X part_info[cur_group, j], X part_iftp[cur_group, j], X part_fhost[cur_group, j], X part_fdir[cur_group, j], X part_whost[cur_group, j], X part_wdir[cur_group, j], X part_gfhost[cur_group, j], X part_gfdir[cur_group, j], X part_gwhost[cur_group, j], X part_gwdir[cur_group, j] X } X } X X X # X # Output link entries X # X X for ( i = 1; i <= num_link; ++i ) X { X cur_link = link_name[i] X X print "L", X cur_link, X link_line[cur_link], X link_desc[cur_link], X link_src[cur_link], X link_cat[cur_link], X link_url[cur_link] X } X X X # X # Output hidden entries X # X X for ( i = 1; i <= num_hide; ++i ) X { X cur_hide = hide_name[i] X X print "H", X cur_hide, X hide_line[cur_hide], X hide_ftp[cur_hide], X hide_web[cur_hide], X hide_fhost[cur_hide], X hide_fdir[cur_hide], X hide_whost[cur_hide], X hide_wdir[cur_hide] X } X X X exit errors X } X X X# X# Function to sort Category keywords X# X Xfunction sort_cat( i, j, min_idx, min_val ) { X X for ( i = 1; i < num_cat; ++i ) X { X min_idx = i X min_val = cat[i] X X for ( j = i+1; j <= num_cat; ++j ) X { X if ( cat[j] < min_val ) X { X min_idx = j X min_val = cat[j] X } X } X X if ( min_idx != i ) X { X cat[min_idx] = cat[i] X cat[i] = min_val X } X } X } X X X# X# Function to sort Source keywords X# X Xfunction sort_src( i, j, min_idx, min_val ) { X X for ( i = 1; i < num_src; ++i ) X { X min_idx = i X min_val = src[i] X X for ( j = i+1; j <= num_src; ++j ) X { X if ( src[j] < min_val ) X { X min_idx = j X min_val = src[j] X } X } X X if ( min_idx != i ) X { X src[min_idx] = src[i] X src[i] = min_val X } X } X } X X X# X# Function to sort FILE entries by name X# X Xfunction sort_files_by_name( i, j, min_idx, min_val ) { X X for ( i = 1; i < num_file; ++i ) X { X min_idx = i X min_val = file_name[i] X X for ( j = i+1; j <= num_file; ++j ) X { X if ( file_name[j] < min_val ) X { X min_idx = j X min_val = file_name[j] X } X } X X if ( min_idx != i ) X { X file_name[min_idx] = file_name[i] X file_name[i] = min_val X } X } X } X X X# X# Function to sort GROUP entries by name X# X Xfunction sort_groups_by_name( i, j, min_idx, min_val ) { X X for ( i = 1; i < num_group; ++i ) X { X min_idx = i X min_val = group_name[i] X X for ( j = i+1; j <= num_group; ++j ) X { X if ( group_name[j] < min_val ) X { X min_idx = j X min_val = group_name[j] X } X } X X if ( min_idx != i ) X { X group_name[min_idx] = group_name[i] X group_name[i] = min_val X } X } X } X X X# X# Function to sort HIDDEN entries by name X# X Xfunction sort_hidden_by_name( i, j, min_idx, min_val ) { X X for ( i = 1; i < num_hide; ++i ) X { X min_idx = i X min_val = hide_name[i] X X for ( j = i+1; j <= num_hide; ++j ) X { X if ( hide_name[j] < min_val ) X { X min_idx = j X min_val = hide_name[j] X } X } X X if ( min_idx != i ) X { X hide_name[min_idx] = hide_name[i] X hide_name[i] = min_val X } X } X } X X X# X# Function to clean up category and source keywords X# X# For now, category and source keywords are combined into the category. X# X Xfunction clean_keywords( name, i, j ) { X X for ( i = 1; i <= num_file; ++i ) X { X name = file_name[i] X X #file_cat[name] = file_cat[name] " " file_src[name] X X if ( length( file_cat[name] ) ) X file_cat[name] = fix_kwds( file_cat[name], file_line[name], "C" ) X X if ( length( file_src[name] ) ) X file_src[name] = fix_kwds( file_src[name], file_line[name], "S" ) X } X X for ( i = 1; i <= num_group; ++i ) X { X name = group_name[i] X X #group_cat[name] = group_cat[name] " " group_src[name] X X if ( length( group_cat[name] ) ) X group_cat[name] = fix_kwds( group_cat[name], group_line[name], "C" ) X X if ( length( group_src[name] ) ) X group_src[name] = fix_kwds( group_src[name], group_line[name], "S" ) X X for ( j = 1; j <= group_np[name]; ++j ) X { X #part_cat[name, j] = part_cat[name, j] " " part_src[name, j] X X if ( length( part_cat[name, j] ) ) X part_cat[name, j] = fix_kwds( part_cat[name, j], X part_line[name, j], "C" ) X X if ( length( part_src[name, j] ) ) X part_src[name, j] = fix_kwds( part_src[name, j], X part_line[name, j], "S" ) X } X } X X for ( i = 1; i <= num_link; ++i ) X { X name = link_name[i] X X #link_cat[name] = link_cat[name] " " link_src[name] X X if ( length( link_cat[name] ) ) X link_cat[name] = fix_kwds( link_cat[name], link_line[name], "C" ) X X if ( length( link_src[name] ) ) X link_src[name] = fix_kwds( link_src[name], link_line[name], "S" ) X } X X } X X X# X# Function to clean up and format a sring of category or source keywords X# X Xfunction fix_kwds( kwds, line, type, num, num_pack, arr, i, j, X min_idx, min_val ) { X X gsub( ",", " " ) # replace commas with blanks X #gsub( "([ \t])+", " " ) # compress whitespace X X kwds = upshift( kwds ) # force to upper case X X if ( kwds == "NONE" ) return kwds # check for special entry X X num = split( kwds, arr ) # split keywords into an array X X if ( num == 0 ) return "" # return if there are no keywords X X X # X # Sort keywords and eliminate duplicates if more than one X # X X if ( num > 1 ) X { X for ( i = 1; i < num; ++i ) X { X min_idx = i X min_val = arr[i] X X for ( j = i+1; j <= num; ++j ) X { X if ( arr[j] < min_val ) X { X min_idx = j X min_val = arr[j] X } X } X X if ( min_idx != i ) X { X arr[min_idx] = arr[i] X arr[i] = min_val X } X } X X num_pack = 1 X X for ( i = 2; i <= num; ++i ) X { X if ( arr[i] != arr[num_pack] ) X if ( ++num_pack != i ) arr[num_pack] = arr[i] X } X X num = num_pack X } X X X # X # Check for legal Category/Source Keywords X # X X if ( type == "C" ) X { X for ( i = 1; i <= num; ++i ) X { X for ( j = 1; j <= num_cat; ++j ) X { X if ( arr[i] == cat[j] ) break X } X X if ( j > num_cat ) errl( line, "Undefined CATEGORY: " arr[i] ) X } X } X else X { X for ( i = 1; i <= num; ++i ) X { X for ( j = 1; j <= num_src; ++j ) X { X if ( arr[i] == src[j] ) break X } X X if ( j > num_src ) errl( line, "Undefined SOURCE Keyword: " arr[i] ) X } X } X X X # X # Repack cleaned up keywords into a single string X # X X kwds = arr[1] X X for ( i = 2; i <= num; ++i ) X { X kwds = kwds " " arr[i] X } X X return kwds X X } X X X# X# Function to strip unwanted characters for beginning of line X# X Xfunction cleanbol() { X X #sub( "^([ \t])*", "" ) X #sub( "^:", "" ) X #sub( "^([ \t])*", "" ) X sub( "^([ \t])*([:=])*([ \t])*", "" ) X X } X X X# X# Function to print an error message on the current line X# X Xfunction err( msg ) { X X errl( NR, msg ) X X } X X X# X# Function to print an error message X# X Xfunction errl( line, msg ) { X X #print FILENAME ", " NR ": " msg X X system( "echo \"" FILENAME ", " line ": " msg "\" 1>&2" ) X X ++errors X X } X X X# X# Function to force letters of a string to upper case X# X Xfunction upshift( str, xstr, xc, i, j ) { X X xstr = "" X X for ( i = 1; i <= length( str ); ++i ) X { X xc = substr( str, i, 1 ) X X if ( ( j = index( locase, xc ) ) ) xstr = xstr substr( upcase, j, 1 ) X else xstr = xstr xc X } X X return xstr X X } X X ' $* SHAR_EOF if [ `wc -c < mk_index.sh` -ne 32205 ] then echo "Lengths do not match -- Bad Copy of mk_index.sh" fi echo "Extracting file mkls-lR.sh" sed -e 's/^X//' <<\SHAR_EOF > mkls-lR.sh X#!/bin/sh X# X# mkls-lR.sh Make ls-lR file X# X# X# Usage: mkls-lR.sh ftp_root_directory X# X# X# SCCS ID: @(#) mkls-lR.sh 1.5 09/22/01 20:16:54 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XUSAGE='usage: mkls-lR.sh ftp_root_directory' X X Xif [ $# -ne 1 ] Xthen X echo "$USAGE" 1>&2 X exit 1 Xfi X XDIR="$1" X X Xecho "Modified 'ls -lR' of Informix Files and Mailing List/Newsgroup Archive X X XLast Updated: `date` X X X------------------------------------------------------------------------------ X" X X X( echo "$DIR:" ; cd $DIR ; /usr/ucb/ls -lR ) | X X nawk ' X BEGIN { in_vol = 0 } X X /\.[01][0-9]:$/ { in_vol = 1 X vol_name = $0 X vol_files = 0 X vol_chars = 0 X next } X X in_vol == 1 { X ++vol_files X if ( $4 != "" ) vol_chars += $4 } X X in_vol == 1 && /^$/ { X printf ( "%s %5d files, %d chars\n", \ X vol_name, vol_files - 2, vol_chars ) X in_vol = 0 } X X in_vol == 0 { print } X X END { if ( in_vol == 1 ) X printf ( "%s %5d files, %d chars\n", \ X vol_name, vol_files - 1, vol_chars ) } X ' | X X sed -e 's/^\/export\/home\/ftp//' \ X -e 's/ carlton //' \ X -e 's/ ftp //' \ X -e 's/ iiug //' \ X -e 's/ root //' \ X -e 's/ walt //' X X Xecho " X------------------------------------------------------------------------------" SHAR_EOF if [ `wc -c < mkls-lR.sh` -ne 1545 ] then echo "Lengths do not match -- Bad Copy of mkls-lR.sh" fi echo "Extracting file mkls-ltR.sh" sed -e 's/^X//' <<\SHAR_EOF > mkls-ltR.sh X#!/bin/sh X# X# mkls-ltR.sh Make ls-ltR file X# X# X# Usage: mkls-ltR.sh ftp_root_directory X# X# X# SCCS ID: @(#) mkls-ltR.sh 1.5 09/22/01 20:16:54 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XUSAGE='usage: mkls-ltR.sh ftp_root_directory' X X Xif [ $# -ne 1 ] Xthen X echo "$USAGE" 1>&2 X exit 1 Xfi X XDIR="$1" X X Xecho "Modified 'ls -ltR' of Informix Files and Mailing List/Newsgroup Archive X X XLast Updated: `date` X X X------------------------------------------------------------------------------ X" X X X( echo "$DIR:" ; cd $DIR ; /usr/ucb/ls -ltR ) | X X nawk ' X BEGIN { in_vol = 0 } X X /\.[01][0-9]:$/ { in_vol = 1 X vol_name = $0 X vol_files = 0 X vol_chars = 0 X next } X X in_vol == 1 { X ++vol_files X if ( $4 != "" ) vol_chars += $4 } X X in_vol == 1 && /^$/ { X printf ( "%s %5d files, %d chars\n", \ X vol_name, vol_files - 2, vol_chars ) X in_vol = 0 } X X in_vol == 0 { print } X X END { if ( in_vol == 1 ) X printf ( "%s %5d files, %d chars\n", \ X vol_name, vol_files - 1, vol_chars ) } X ' | X X sed -e 's/^\/export\/home\/ftp//' \ X -e 's/ carlton //' \ X -e 's/ ftp //' \ X -e 's/ iiug //' \ X -e 's/ root //' \ X -e 's/ walt //' X X Xecho " X------------------------------------------------------------------------------" SHAR_EOF if [ `wc -c < mkls-ltR.sh` -ne 1552 ] then echo "Lengths do not match -- Bad Copy of mkls-ltR.sh" fi echo "Extracting file synch_web_cmp.sh" sed -e 's/^X//' <<\SHAR_EOF > synch_web_cmp.sh X#!/bin/sh X# X# synch_web_cmp.sh Update Web files from FTP files based on cmp command X# X# X# Usage: mk_index.sh source_file > index_data_file X# mk_filelist.sh index_data_file > filelist_file X# synch_web_cmp.sh filelist_file X# X# X# This script will synchronize the Repository WEb files with their FTP X# counterparts. FTP files will not be affected. X# X# X# SCCS ID: @(#) synch_web_cmp.sh 1.7 09/22/01 18:49:34 X# X# @(#) (c) Copyright 1999-2001 by Walt Hultgren. All rights reserved. X# X# X X XPATH=":/usr/ucb:/usr/bin:/bin:/opt/local/bin:/opt/gnu/bin:/usr/local/bin" XPATH="$PATH:/iiug/iiug_people/walt/bin" Xexport PATH X XTAB=`/usr/bin/echo '\t\c'` X X Xif [ $# -ne 1 ] Xthen X echo "usage: synch_web_cmp.sh filelist" 1>&2 X exit 1 Xfi X X Xnawk -F"$TAB" ' X X $1 == "NOWEB" { next } X $2 == "NOFTP" { next } X $2 == "NOSERVE" { next } X X { X if ( NF != 2 ) X { X print NR ": wrong number of fields - " NF X exit 1 X } X X web_file = $1 X ftp_file = $2 X X web_there = 0 X X X if ( length( ftp_file ) == 0 ) X { X print NR ": no FTP file" X exit 1 X } X X X if ( system( "test -f " ftp_file ) ) X { X print "FTP file " ftp_file " does not exist" X exit 1 X } X X X if ( length( web_file ) ) X { X if ( ! system( "test -f " web_file ) ) web_there = 1 X } X X X if ( ftp_file ~ /\.Z$/ ) X { X cmp = "uncompress -c " ftp_file " | cmp -s - " web_file X upd = "uncompress -c " ftp_file " > " web_file X } X else X { X if ( ftp_file ~ /\.gz$/ ) X { X cmp = "gunzip -c " ftp_file " | cmp -s - " web_file X upd = "gunzip -c " ftp_file " > " web_file X } X else X { X cmp = "cmp -s " ftp_file " " web_file X upd = "cp " ftp_file " " web_file X } X } X X X if ( web_there ) X { X if ( system( cmp ) ) X { X need_update = 1 X } X else X { X need_update = 0 X } X } X else X { X need_update = 1 X } X X X if ( need_update ) X { X print "" X X if ( web_there ) X { X cmd = "mv -f " web_file " " web_file ".OLD" X X print cmd X if ( system( cmd ) ) exit 1 X } X X print upd X if ( system( upd ) ) exit 1 X X print "chmod 664 " web_file X if ( system( "chmod 664 " web_file ) ) exit 1 X } X } X X ' $* SHAR_EOF if [ `wc -c < synch_web_cmp.sh` -ne 2480 ] then echo "Lengths do not match -- Bad Copy of synch_web_cmp.sh" fi echo "Done." exit 0