home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
base32pr.zip
/
Install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-05-28
|
2KB
|
100 lines
/* REXX Base32 install script */
/* 14/03/97 Kelvin Ussher */
'@echo off'
Base32Drive = ''
OS2Drive = ''
parse upper arg Base32Drive OS2Drive
if Base32Drive = '' then Base32Drive = 'C:'
if OS2Drive = '' then OS2Drive = 'C:'
SAY 'Installing base32 to ' || base32Drive || '\base32. Please wait...'
Base32Drive
'if not exist \base32 md \base32'
'cd \base32'
'copy a:\*.zip \base32'
'a:\unzip \base32\*.zip *'
/* change to the drive where os2 is installed */
OS2Drive
'copy \config.sys \config.bak'
call lineout "\config.sys",,1
do until lines('\config.bak') = 0
curline = linein('\config.bak')
subline = translate( substr(curline,1,8) )
select
/* Make sure FROOT\DLL is in the LIBPATH */
when subline = "LIBPATH=" then
do
if right(curline,1) <> ";" then do
/* append a semicolon */
curline = curline';'
end
if pos("BASE32",curline) = 0 then
do
parse var curline "LIBPATH="rest
call lineout "\config.sys", "LIBPATH="|| Base32Drive || "\BASE32;" || rest
say "Added "|| Base32Drive || "\BASE32; to LIBPATH"
end
else
do
call lineout "\config.sys", curline
end
end
when subline = "SET PATH" then
do
if right(curline,1) <> ";" then do
/* append a semicolon */
curline = curline';'
end
if pos( "BASE32",curline) = 0 then
do
call lineout "\config.sys", curline || base32Drive || "\base32;"
say "Appended " || base32Drive || "\base32; to PATH"
end
else
do
call lineout "\config.sys", curline
end
end
/* For all other lines leave it alone */
otherwise
do
call lineout "\config.sys", curline
end
end
end
call lineout "\config.sys"
/* now put a folder and program icon on the desktop */
CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
If SysCreateObject( "WPFolder" , "Base32" , "<WP_DESKTOP>" , "OBJECTID=<BASE32>" ) Then
IF SysCreateObject( "WPProgram" , "Base32" , "<BASE32>" ,"EXENAME="||Base32Drive||"\BASE32\BASE32.EXE" ) then
SAY 'All complete, please re-start OS/2 to effect the changes to config.sys'
else
SAY 'could not create base32 program icon'
ELSE
SAY 'Could not create base32 folder'