|
Packit |
575503 |
$! File: Build_GAWK_PCSI_DESC.COM
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Build the *.pcsi$text file in the following sections:
|
|
Packit |
575503 |
$! Required software dependencies.
|
|
Packit |
575503 |
$! install/upgrade/postinstall steps.
|
|
Packit |
575503 |
$! 1. Duplicate filenames need an alias procedure.
|
|
Packit |
575503 |
$! 2. ODS-5 filenames need an alias procedure.
|
|
Packit |
575503 |
$! 3. Special alias links for executables (cp. -> gnv$cp.exe)
|
|
Packit |
575503 |
$! if a lot, then an alias procedure is needed.
|
|
Packit |
575503 |
$! 4. Rename the files to lowercase.
|
|
Packit |
575503 |
$! Move Release Notes to destination
|
|
Packit |
575503 |
$! Source kit option
|
|
Packit |
575503 |
$! Create directory lines
|
|
Packit |
575503 |
$! Add file lines for gawk.
|
|
Packit |
575503 |
$! Add Link alias procedure file (used for gawk)
|
|
Packit |
575503 |
$! Add [.SYS$STARTUP]gawk_startup file
|
|
Packit |
575503 |
$! Add Release notes file.
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! The file PCSI_GAWK_FILE_LIST.TXT is read in to get the files other
|
|
Packit |
575503 |
$! than the release notes file and the source backup file.
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! The PCSI system can really only handle ODS-2 format filenames and
|
|
Packit |
575503 |
$! assumes that there is only one source directory. It also assumes that
|
|
Packit |
575503 |
$! all destination files with the same name come from the same source file.
|
|
Packit |
575503 |
$! Fortunately GAWK does not trip most of these issues, so those steps
|
|
Packit |
575503 |
$! above are marked N/A.
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! A rename action section is needed to make sure that the files are
|
|
Packit |
575503 |
$! created in the GNV$GNU: in the correct case, and to create the alias
|
|
Packit |
575503 |
$! link [usr.bin]gawk. for [usr.bin]gawk.exe.
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! 02-Jan-2014 J. Malmberg - Gawk version
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!===========================================================================
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
|
|
Packit |
575503 |
$ if kit_name .eqs. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ write sys$output "@[.vms]MAKE_PCSI_GAWK_KIT_NAME.COM has not been run."
|
|
Packit |
575503 |
$ goto all_exit
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
|
|
Packit |
575503 |
$ if producer .eqs. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ write sys$output "@[.vms]MAKE_PCSI_GAWK_KIT_NAME.COM has not been run."
|
|
Packit |
575503 |
$ goto all_exit
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
|
|
Packit |
575503 |
$ if filename_base .eqs. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ write sys$output "@[.vms]MAKE_PCSI_GAWK_KIT_NAME.COM has not been run."
|
|
Packit |
575503 |
$ goto all_exit
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Parse the kit name into components.
|
|
Packit |
575503 |
$!---------------------------------------
|
|
Packit |
575503 |
$ producer = f$element(0, "-", kit_name)
|
|
Packit |
575503 |
$ base = f$element(1, "-", kit_name)
|
|
Packit |
575503 |
$ product = f$element(2, "-", kit_name)
|
|
Packit |
575503 |
$ mmversion = f$element(3, "-", kit_name)
|
|
Packit |
575503 |
$ majorver = f$extract(0, 3, mmversion)
|
|
Packit |
575503 |
$ minorver = f$extract(3, 2, mmversion)
|
|
Packit |
575503 |
$ updatepatch = f$element(4, "-", kit_name)
|
|
Packit |
575503 |
$ if updatepatch .eqs. "-" then updatepatch = ""
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! kit type of "D" means a daily build
|
|
Packit |
575503 |
$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ product_line = "product ''producer' ''base' ''product'"
|
|
Packit |
575503 |
$ if updatepatch .eqs. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ product_name = " ''majorver'.''minorver'"
|
|
Packit |
575503 |
$ else
|
|
Packit |
575503 |
$ product_name = " ''majorver'.''minorver'-''updatepatch'"
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ product_line = product_line + " ''product_name' full;"
|
|
Packit |
575503 |
$!write sys$output product_line
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Create the file as a VMS text file.
|
|
Packit |
575503 |
$!----------------------------------------
|
|
Packit |
575503 |
$ base_file = kit_name
|
|
Packit |
575503 |
$ create 'base_file'.pcsi$desc
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Start building file.
|
|
Packit |
575503 |
$!----------------------
|
|
Packit |
575503 |
$ open/append pdsc 'base_file'.pcsi$desc
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ write pdsc product_line
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Required product dependencies.
|
|
Packit |
575503 |
$!----------------------------------
|
|
Packit |
575503 |
$ vmsprd = "DEC"
|
|
Packit |
575503 |
$ if base .eqs. "I64VMS" then vmsprd = "HP"
|
|
Packit |
575503 |
$ vsiprd = "VSI"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ arch_type = f$getsyi("ARCH_NAME")
|
|
Packit |
575503 |
$ node_swvers = f$getsyi("node_swvers")
|
|
Packit |
575503 |
$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
|
|
Packit |
575503 |
$ majver = f$element(0, ".", vernum)
|
|
Packit |
575503 |
$ minverdash = f$element(1, ".", vernum)
|
|
Packit |
575503 |
$ minver = f$element(0, "-", minverdash)
|
|
Packit |
575503 |
$ dashver = f$element(1, "-", minverdash)
|
|
Packit |
575503 |
$ if dashver .eqs. "-" then dashver = ""
|
|
Packit |
575503 |
$ vmstag = majver + minver + dashver
|
|
Packit |
575503 |
$ code = f$extract(0, 1, arch_type)
|
|
Packit |
575503 |
$ arch_code = f$extract(0, 1, arch_type)
|
|
Packit |
575503 |
$ line_out = -
|
|
Packit |
575503 |
" if ((<software ''vmsprd' ''base' VMS> and"
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = -
|
|
Packit |
575503 |
" (not
|
|
Packit |
575503 |
" ''node_swvers'>)) or"
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = -
|
|
Packit |
575503 |
" (<software ''vsiprd' ''base' VMS>"
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = -
|
|
Packit |
575503 |
" and (not
|
|
Packit |
575503 |
" ''node_swvers'>))) ;"
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ write pdsc " error NEED_VMS''vmstag';"
|
|
Packit |
575503 |
$ write pdsc " end if;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! install/upgrade/postinstall steps.
|
|
Packit |
575503 |
$!-----------------------------------
|
|
Packit |
575503 |
$! 1. Duplicate filenames need an alias procedure.
|
|
Packit |
575503 |
$! 2. ODS-5 filenames need an alias procedure.
|
|
Packit |
575503 |
$! 3. Special alias links for executables (gawk. -> gnv$gawk.exe)
|
|
Packit |
575503 |
$! if a lot, then an alias procedure is needed.
|
|
Packit |
575503 |
$! 4. Rename the files to lowercase.
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Alias links needed.
|
|
Packit |
575503 |
$!-------------------------
|
|
Packit |
575503 |
$ add_alias_lines = ""
|
|
Packit |
575503 |
$ rem_alias_lines = ""
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Read through the file list to set up aliases and rename commands.
|
|
Packit |
575503 |
$!---------------------------------------------------------------------
|
|
Packit |
575503 |
$ open/read flst [.vms]pcsi_gawk_file_list.txt
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$inst_alias_loop:
|
|
Packit |
575503 |
$ read/end=inst_alias_loop_end flst line_in
|
|
Packit |
575503 |
$ line_in = f$edit(line_in,"compress,trim,uncomment")
|
|
Packit |
575503 |
$ if line_in .eqs. "" then goto inst_alias_loop
|
|
Packit |
575503 |
$ pathname = f$element(0, " ", line_in)
|
|
Packit |
575503 |
$ linkflag = f$element(1, " ", line_in)
|
|
Packit |
575503 |
|
|
Packit |
575503 |
$ if linkflag .nes. "->" then goto inst_alias_write
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ linktarget = f$element(2, " ", line_in)
|
|
Packit |
575503 |
$ nlink = "pcsi$destination:" + pathname
|
|
Packit |
575503 |
$ ntarg = "pcsi$destination:" + linktarget
|
|
Packit |
575503 |
$ new_add_alias_line = -
|
|
Packit |
575503 |
"""if f$search(""""''nlink'"""") .eqs. """""""" then" + -
|
|
Packit |
575503 |
" set file/enter=''nlink' ''ntarg'"""
|
|
Packit |
575503 |
$ if add_alias_lines .nes. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ add_alias_lines = add_alias_lines + "," + new_add_alias_line
|
|
Packit |
575503 |
$ else
|
|
Packit |
575503 |
$ add_alias_lines = new_add_alias_line
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ new_rem_alias_line = -
|
|
Packit |
575503 |
"""if f$search(""""''nlink'"""") .nes. """""""" then" + -
|
|
Packit |
575503 |
" set file/remove ''nlink';"""
|
|
Packit |
575503 |
$ if rem_alias_lines .nes. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ rem_alias_lines = rem_alias_lines + "," + new_rem_alias_line
|
|
Packit |
575503 |
$ else
|
|
Packit |
575503 |
$ rem_alias_lines = new_rem_alias_line
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ goto inst_alias_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$inst_alias_write:
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! execute install / remove
|
|
Packit |
575503 |
$ write pdsc " execute install ("
|
|
Packit |
575503 |
$! add aliases
|
|
Packit |
575503 |
$ i = 0
|
|
Packit |
575503 |
$ex_ins_loop:
|
|
Packit |
575503 |
$ line = f$element(i, ",", add_alias_lines)
|
|
Packit |
575503 |
$ i = i + 1
|
|
Packit |
575503 |
$ if line .eqs. "" then goto ex_ins_loop
|
|
Packit |
575503 |
$ if line .eqs. "," then goto ex_ins_loop_end
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out,","
|
|
Packit |
575503 |
$ line_out = line
|
|
Packit |
575503 |
$ goto ex_ins_loop
|
|
Packit |
575503 |
$ex_ins_loop_end:
|
|
Packit |
575503 |
$ if line_out .eqs. "" then line_out = " ""continue"""
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$ write pdsc " )"
|
|
Packit |
575503 |
$ write pdsc " remove ("
|
|
Packit |
575503 |
$! remove aliases
|
|
Packit |
575503 |
$ line_out = -
|
|
Packit |
575503 |
" ""@pcsi$destination:[gnv.vms_bin]gawk_alias_setup.com remove"""
|
|
Packit |
575503 |
$ i = 0
|
|
Packit |
575503 |
$ex_rem_loop:
|
|
Packit |
575503 |
$ line = f$element(i, ",", rem_alias_lines)
|
|
Packit |
575503 |
$ i = i + 1
|
|
Packit |
575503 |
$ if line .eqs. "" then goto ex_rem_loop
|
|
Packit |
575503 |
$ if line .eqs. "," then goto ex_rem_loop_end
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out,","
|
|
Packit |
575503 |
$ line_out = line
|
|
Packit |
575503 |
$ goto ex_rem_loop
|
|
Packit |
575503 |
$ex_rem_loop_end:
|
|
Packit |
575503 |
$ if line_out .eqs. "" then line_out = " ""continue"""
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$ write pdsc " ) ;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! execute upgrade
|
|
Packit |
575503 |
$ write pdsc " execute upgrade ("
|
|
Packit |
575503 |
$ line_out = -
|
|
Packit |
575503 |
" ""@pcsi$destination:[gnv.vms_bin]gawk_alias_setup.com remove"""
|
|
Packit |
575503 |
$ i = 0
|
|
Packit |
575503 |
$ex_upg_loop:
|
|
Packit |
575503 |
$ line = f$element(i, ",", rem_alias_lines)
|
|
Packit |
575503 |
$ i = i + 1
|
|
Packit |
575503 |
$ if line .eqs. "" then goto ex_upg_loop
|
|
Packit |
575503 |
$ if line .eqs. "," then goto ex_upg_loop_end
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out,","
|
|
Packit |
575503 |
$ line_out = line
|
|
Packit |
575503 |
$ goto ex_upg_loop
|
|
Packit |
575503 |
$ex_upg_loop_end:
|
|
Packit |
575503 |
$ if line_out .eqs. "" then line_out = " ""continue"""
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$! remove aliases
|
|
Packit |
575503 |
$ write pdsc " ) ;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! execute postinstall
|
|
Packit |
575503 |
$ write pdsc " execute postinstall ("
|
|
Packit |
575503 |
$ if arch_code .nes. "V"
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ line_out = " ""set process/parse=extended"","
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ line_out = " ""@pcsi$destination:[gnv.vms_bin]remove_old_gawk.com"","
|
|
Packit |
575503 |
$ write pdsc line_out
|
|
Packit |
575503 |
$ line_out = " ""@pcsi$destination:[gnv.vms_bin]gawk_alias_setup.com"""
|
|
Packit |
575503 |
$ i = 0
|
|
Packit |
575503 |
$ex_pins_loop:
|
|
Packit |
575503 |
$ line = f$element(i, ",", add_alias_lines)
|
|
Packit |
575503 |
$ i = i + 1
|
|
Packit |
575503 |
$ if line .eqs. "" then goto ex_pins_loop
|
|
Packit |
575503 |
$ if line .eqs. "," then goto ex_pins_loop_end
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out,","
|
|
Packit |
575503 |
$ line_out = line
|
|
Packit |
575503 |
$ goto ex_pins_loop
|
|
Packit |
575503 |
$ex_pins_loop_end:
|
|
Packit |
575503 |
$ if line_out .eqs. "" then line_out = " ""continue"""
|
|
Packit |
575503 |
$! write pdsc line_out
|
|
Packit |
575503 |
$! line_out = ""
|
|
Packit |
575503 |
$! add aliases and follow with renames.
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$goto inst_dir
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$inst_dir_loop:
|
|
Packit |
575503 |
$ read/end=inst_alias_loop_end flst line_in
|
|
Packit |
575503 |
$ line_in = f$edit(line_in,"compress,trim,uncomment")
|
|
Packit |
575503 |
$ if line_in .eqs. "" then goto inst_dir_loop
|
|
Packit |
575503 |
$inst_dir:
|
|
Packit |
575503 |
$ pathname = f$element(0, " ", line_in)
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Ignore the directory entries for now.
|
|
Packit |
575503 |
$!-----------------------------------------
|
|
Packit |
575503 |
$ filedir = f$parse(pathname,,,"DIRECTORY")
|
|
Packit |
575503 |
$ if pathname .eqs. filedir then goto inst_dir_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! process .dir extensions for rename
|
|
Packit |
575503 |
$! If this is not a directory then start processing files.
|
|
Packit |
575503 |
$!-------------------------
|
|
Packit |
575503 |
$ filetype = f$parse(pathname,,,"TYPE")
|
|
Packit |
575503 |
$ filetype_u = f$edit(filetype, "upcase")
|
|
Packit |
575503 |
$ filename = f$parse(pathname,,,"NAME")
|
|
Packit |
575503 |
$ if filetype_u .nes. ".DIR" then goto inst_file
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! process directory lines for rename.
|
|
Packit |
575503 |
$!--------------------------------------
|
|
Packit |
575503 |
$ if line_out .nes. ""
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ write pdsc line_out,","
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ if arch_code .nes. "V"
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out,","
|
|
Packit |
575503 |
$ line_out = " ""rename pcsi$destination:''pathname' ''filename'.DIR"""
|
|
Packit |
575503 |
$ else
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ goto inst_dir_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! process file lines for rename
|
|
Packit |
575503 |
$!---------------------------------
|
|
Packit |
575503 |
$inst_file_loop:
|
|
Packit |
575503 |
$ read/end=inst_alias_loop_end flst line_in
|
|
Packit |
575503 |
$ line_in = f$edit(line_in,"compress,trim,uncomment")
|
|
Packit |
575503 |
$ if line_in .eqs. "" then goto inst_dir_loop
|
|
Packit |
575503 |
$ pathname = f$element(0, " ", line_in)
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Filenames with $ in them are VMS special and do not need to be lowercased.
|
|
Packit |
575503 |
$! --------------------------------------------------------------------------
|
|
Packit |
575503 |
$ if f$locate("$", pathname) .lt. f$length(pathname) then goto inst_file_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ filetype = f$parse(pathname,,,"TYPE")
|
|
Packit |
575503 |
$ filename = f$parse(pathname,,,"NAME") + filetype
|
|
Packit |
575503 |
$inst_file:
|
|
Packit |
575503 |
$ if arch_code .nes. "V"
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out,","
|
|
Packit |
575503 |
$ filetype = f$parse(pathname,,,"TYPE")
|
|
Packit |
575503 |
$ filename = f$parse(pathname,,,"NAME") + filetype
|
|
Packit |
575503 |
$ line_out = " ""rename pcsi$destination:''pathname' ''filename'"""
|
|
Packit |
575503 |
$ else
|
|
Packit |
575503 |
$ if line_out .nes. "" then write pdsc line_out
|
|
Packit |
575503 |
$ line_out = ""
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ goto inst_file_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$inst_alias_loop_end:
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$write pdsc line_out
|
|
Packit |
575503 |
$write pdsc " ) ;"
|
|
Packit |
575503 |
$close flst
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Move Release Notes to destination
|
|
Packit |
575503 |
$!-------------------------------------
|
|
Packit |
575503 |
$write pdsc " information RELEASE_NOTES phase after ;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Source kit option
|
|
Packit |
575503 |
$!---------------------
|
|
Packit |
575503 |
$write pdsc " option SOURCE default 0;"
|
|
Packit |
575503 |
$write pdsc " directory ""[gnv.common_src]"" PROTECTION PUBLIC ;"
|
|
Packit |
575503 |
$write pdsc -
|
|
Packit |
575503 |
" file ""[gnv.common_src]''filename_base'_original_src.bck"""
|
|
Packit |
575503 |
$write pdsc -
|
|
Packit |
575503 |
" source [common_src]''filename_base'_original_src.bck ;"
|
|
Packit |
575503 |
$if f$search("sys$disk:''filename_base'_vms_src.bck") .nes. ""
|
|
Packit |
575503 |
$then
|
|
Packit |
575503 |
$ write pdsc " directory ""[gnv.vms_src]"" PROTECTION PUBLIC ;"
|
|
Packit |
575503 |
$ write pdsc " file ""[gnv.vms_src]''filename_base'_vms_src.bck"""
|
|
Packit |
575503 |
$ write pdsc " source [vms_src]''filename_base'_vms_src.bck ;"
|
|
Packit |
575503 |
$endif
|
|
Packit |
575503 |
$write pdsc " end option;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Read through the file list again.
|
|
Packit |
575503 |
$!----------------------------------
|
|
Packit |
575503 |
$open/read flst [.vms]pcsi_gawk_file_list.txt
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Create directory lines
|
|
Packit |
575503 |
$!-------------------------
|
|
Packit |
575503 |
$flst_dir_loop:
|
|
Packit |
575503 |
$ read/end=flst_loop_end flst line_in
|
|
Packit |
575503 |
$ line_in = f$edit(line_in,"compress,trim,uncomment")
|
|
Packit |
575503 |
$ if line_in .eqs. "" then goto flst_dir_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ filename = f$element(0, " ", line_in)
|
|
Packit |
575503 |
$ linkflag = f$element(1, " ", line_in)
|
|
Packit |
575503 |
$ if linkflag .eqs. "->" then goto flst_dir_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Ignore .dir extensions
|
|
Packit |
575503 |
$!-------------------------
|
|
Packit |
575503 |
$ filetype = f$edit(f$parse(filename,,,"TYPE"), "upcase")
|
|
Packit |
575503 |
$ if filetype .eqs. ".DIR" then goto flst_dir_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ destname = filename
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! It should be just a directory then.
|
|
Packit |
575503 |
$!-------------------------------------
|
|
Packit |
575503 |
$ filedir = f$edit(f$parse(filename,,,"DIRECTORY"), "lowercase")
|
|
Packit |
575503 |
$! If this is not a directory then start processing files.
|
|
Packit |
575503 |
$!---------------------------------------------------------
|
|
Packit |
575503 |
$ if filename .nes. filedir then goto flst_file
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$ write pdsc " directory ""''destname'"" PROTECTION PUBLIC ;"
|
|
Packit |
575503 |
$ goto flst_dir_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Add file lines for gawk.
|
|
Packit |
575503 |
$!---------------------------
|
|
Packit |
575503 |
$flst_file_loop:
|
|
Packit |
575503 |
$ read/end=flst_loop_end flst line_in
|
|
Packit |
575503 |
$ line_in = f$edit(line_in,"compress,trim,uncomment")
|
|
Packit |
575503 |
$ if line_in .eqs. "" then goto flst_file_loop
|
|
Packit |
575503 |
$ filename = f$element(0, " ", line_in)
|
|
Packit |
575503 |
$ destname = filename
|
|
Packit |
575503 |
$flst_file:
|
|
Packit |
575503 |
$ if arch_code .eqs. "V"
|
|
Packit |
575503 |
$ then
|
|
Packit |
575503 |
$! ! These files not available on VAX.
|
|
Packit |
575503 |
$ src_dir = f$parse(destname,,,"DIRECTORY")
|
|
Packit |
575503 |
$ if src_dir .eqs. "[GNV.USR.LIB.GAWK]" then goto flst_file_loop
|
|
Packit |
575503 |
$ endif
|
|
Packit |
575503 |
$ srcfile = filename - "gnv."
|
|
Packit |
575503 |
$ write pdsc " file ""''destname'"" "
|
|
Packit |
575503 |
$ write pdsc " source ""''srcfile'"" ;"
|
|
Packit |
575503 |
$ goto flst_file_loop
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$flst_loop_end:
|
|
Packit |
575503 |
$ close flst
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Add [.SYS$STARTUP]gawk_startup file
|
|
Packit |
575503 |
$!---------------------------------------
|
|
Packit |
575503 |
$ write pdsc " file ""[sys$startup]gnv$gawk_startup.com"""
|
|
Packit |
575503 |
$ write pdsc " source [vms_bin]gnv$gawk_startup.com ;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Add Release notes file.
|
|
Packit |
575503 |
$!------------------------------
|
|
Packit |
575503 |
$ write pdsc -
|
|
Packit |
575503 |
" file ""[SYSHLP]''filename_base'.release_notes"" release notes ;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$! Close the product file
|
|
Packit |
575503 |
$!------------------------
|
|
Packit |
575503 |
$ write pdsc "end product;"
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$close pdsc
|
|
Packit |
575503 |
$!
|
|
Packit |
575503 |
$all_exit:
|
|
Packit |
575503 |
$ exit
|