home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 29 Fixes_o
/
29-Fixes_o.zip
/
ctc308.zip
/
updpakg.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-07-29
|
2KB
|
75 lines
/*****************************************************************************/
/* IBM(R) VisualAge(TM) C++ for OS/2(R), Version 3 */
/* (C)Copyright IBM Corp. 1995. */
/* - Licensed Material - Program-Property of IBM - All Rights Reserved */
/*****************************************************************************/
/**************************************************************/
/* This routine updates the package file */
/**************************************************************/
"@echo off"
arg filename add_file
output_file = filename
output_file = strip(output_file, 'T')
output_file = overlay('out', output_file, length(output_file) - 2)
done = FALSE
c_done = FALSE
first_time = TRUE
do until lines(filename) = 0
record = linein(filename) /* Read the record */
call lineout output_file, record /* Write the record */
if (first_time = TRUE) then
do
first_time = FALSE
if (RESULT) then
do
SAY "Unable to write to vacpp.out"
SAY "Cannot update package file successfully."
c_done = TRUE
LEAVE
end
end
if ( word(record, 1) = 'COMPONENT' & done = FALSE ) then
do
next_rec = linein(filename)
if (word(next_rec, 3) = " 'Compiler " & word(next_rec, 4) = " and ") then
do
add_rec = linein(add_file)
do until ( lines(add_file) = 0 )
add_rec = linein(add_file)
call lineout output_file, add_rec
end
record = linein(filename)
do until ( word(record, 1) = 'COMPONENT' | lines(filename) = 0 )
record = linein(filename)
end
if (lines(filename) = 0) then
do
SAY "Cannot update package file successfully."
SAY "Check vacpp.pkg on your system."
done = TRUE
end
else
call lineout output_file, record /* Write the record */
c_done = TRUE
end
else
call lineout output_file, next_rec
end
end
if (c_done = FALSE) then
do
SAY "Cannot update package file successfully."
SAY "Check vacpp.pkg on your system."
end