home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
netdor3.zip
/
DISK_13
/
IMAGE12.ZIP
/
CATALOG
/
LIBREABE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-09-20
|
3KB
|
112 lines
/*****************************************************************************
* Licensed Materials-Property of IBM *
* 5604-472 (c) Copyright IBM Corporation, 1993 *
* All rights reserved. *
* US Government Users Restricted Rights - *
* Use, duplication or disclosure restricted *
* by GSA ADP Schedule Contract with IBM Corp. *
*****************************************************************************
* Configuration back-end for LIBREA *
*****************************************************************************/
trace 'O'
signal on syntax
signal on novalue
call on halt
call rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
Ver = 'CAddInit'()
if abbrev(Ver, 'ERROR:')
then exit 200
Title = RxCAdd.STitle 'Installation'
XCode = 0
if 'REGFUNC'('COUENV') <> 0
then call AddExit 206, 'Error registering COUENV.DLL.'
select
when RxCAdd.OpType = 'ADD'
then do
XCode = RunItl('LIBREABE.ITL')
end
when RxCAdd.OpType = 'REMOVE'
then do
XCode = RunItl('LIBREABE.ITL')
end
otherwise do
call 'MessageBox' Title, 'Unexpected operation type "'RxCAdd.OpType'"'
XCode = 201
end
end
call AddExit XCode
RunItl: procedure expose RXCADD.
parse arg ItlName
CDr = RxCouInfo('GET', 'REMOTE')
CDr = strip(CDr, 'T', '\')||'\'
List = 'VERSION STITLE OPTYPE PREVIOUS'
do I = 1 to words(List)
Name = 'RXCADD.'word(List, I)
call value Name, value(Name), 'OS2ENVIRONMENT'
end I
do I = 1 to RXCADD.PROGINFO.0
call value 'RXCADD.PROGINFO.'I, RXCADD.PROGINFO.I, 'OS2ENVIRONMENT'
end I
if pos('\', ItlName) = 0
then do
parse source . . Me
ItlName = left(Me, lastpos('\', Me))||ItlName
end
'@CALL' CDr'IMPIT.CMD /R:'ItlName '/NOPAUSE'
return rc
AddExit:
parse arg XCode, Msg
if XCode = ''
then XCode = 0
if Msg <> ''
then call 'MessageBox' Title, Msg
call 'CAddComplete' XCode
call 'CAddExit'
exit XCode
/***********************************************************************
* ERROR TRAPS *
***********************************************************************/
BugInit:
signal off error; signal off failure; signal off halt
signal off novalue; signal off notready; signal off syntax
parse upper source . . Me
if symbol('TITLE') = 'LIT'
then Title = 'COREADD Failure'
Me = Me':'||'0A'x
if symbol('GLOBALS') = 'LIT'
then do
Globals = 'TrVal'
TrVal = 'O'
end
return
Halt:
Where = SigL
call BugInit
call 'MessageBox' Title, Me||'Execution halted by user in line' Where
XXC = 204
signal DebugExit
Syntax:
Where = SigL
call BugInit
call 'MessageBox' Title,,
Me||'Syntax error' rc '('errortext(rc)') in line' Where'.'
XXC = 203
signal DebugExit
Novalue:
Where = SigL
call BugInit
call 'MessageBox' Title, Me||'NOVALUE error ('condition('D')') in line' Where'.'
XXC = 203
signal DebugExit
DebugExit:
call 'CAddComplete' XXC
call 'CAddExit'
exit XXC