home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
oslite11.zip
/
lthdr.cmd
next >
Wrap
OS/2 REXX Batch file
|
1994-09-20
|
965b
|
47 lines
on break goto clean
if NOT "%@EVAL[2+2]"=="4" goto no4os2
if "%OSLITE"=="" goto err
if "%FULLPAT"=="1" goto leaveasis
SET TMP=%OSLITE\%ORIGNAME
SET %ORIGNAME=%TMP
:leaveasis
set TMP1=%@UNIQUE[%OSLITE]
if NOT EXIST %TMP1 goto tmpfail
if NOT "%@EXT[%0]"=="CMD" goto noext
SET CURNAME=%0
goto doit
:noext
SET CURNAME=%0.CMD
:doit
SET CURPAT=%@SEARCH[%CURNAME]
if NOT "%CURPAT"=="" goto found
SET CURPAT=%CURNAME
echo %CURPAT
:found
skip %LITSIZE <%CURPAT >%TMP1
:decomp0
gzip -dcn <%TMP1 >%ORIGNAME
if NOT ERRORLEVEL==0 goto iscorrupt
%ORIGNAME %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16
goto clean
:tmpfail
cho Couldn't create temp file.
goto clean
:err
echo OSLITE environment not defined.
quit
:iscorrupt
echo File is corrupt.
goto clean
:no4os2
echo You must install 4OS2.
quit
:clean
if NOT EXIST %TMP1 goto clean0
del %TMP1 >nul
:clean0
if NOT EXIST %ORIGNAME goto clean1
del %ORIGNAME >nul
:clean1
quit