[BACK]Return to addinst CVS log [TXT][DIR] Up to [Development] / inventor / doc / man / tools

File: [Development] / inventor / doc / man / tools / addinst (download)

Revision 1.1, Tue Aug 15 12:56:14 2000 UTC (17 years, 2 months ago) by naaman
Branch point for: MAIN

Initial revision

#! /usr/bin/nawk -f 
#  
# AWK script: addinst.
# Usage: find . <predicates to select valid man page filenames> \
#    | xargs getnames opt=<langopt> | addinst idb_tag install_path install_prog
# Generates INSTALL lines for file OtherInstall
# Called from manrules

BEGIN { idbtag = ARGV[1]
  	install_path = ARGV[2]
	install_prog = ARGV[3]
  	ARGV[1] = "-" 
	ARGV[2] = ""
	ARGV[3] = ""
}
{	NAMELIST = ""
	gsub(/\.[0-9](.?)*:/, "", $1)
	for (i=2; i<=NF; i++) {
		# only create links for names that are different from filename
		if ($i != $1)
			NAMELIST = NAMELIST $i ".z "
        }
	if (NAMELIST != "" && $1 != "mail_att" && $1 != "mail_bsd") {
		printf("\t%s -idb \"%s\" -F %s -lns %s.z %s\n", \
		       install_prog, idbtag, install_path, $1, NAMELIST)
	}
}