home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 29 Fixes_o
/
29-Fixes_o.zip
/
wr07060a.zip
/
US7060B2.DSK
/
LCU
/
LCU.ZIP
/
GETFIX.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-10-28
|
2KB
|
55 lines
@ECHO OFF
REM GETFIX 2.0
SETLOCAL
IF %1.==. ECHO GETFIX source (target)
IF %1.==. GOTO END
REM
REM CHECK SOURCE DIRECTORY
REM
IF EXIST %1\FIX\OS2\*.* GOTO GETTAR
COPY %1\FIX\OS2\*.*
GOTO END
:GETTAR
REM
REM GET TARGET DIRECTORY
REM
SET GF_TARGET=
IF %2.==. SET GF_TARGET=.
IF NOT %2.==. SET GF_TARGET=%2
SET GF_MKDIR=
DIR %GF_TARGET%\*.* >> NUL 2>>&1
IF ERRORLEVEL 1 SET GF_MKDIR=YES
IF %GF_MKDIR%.==YES. ECHO MD %GF_TARGET%
IF %GF_MKDIR%.==YES. MD %GF_TARGET%
IF ERRORLEVEL 1 GOTO END
REM
REM CHECK FOR UNPACK
REM
SET GF_UNPACK=
SET GF_UNPACK_FOUND=
REM
IF EXIST %1\UNPACK2.EXE IF EXIST %1\FIX\OS2\UNPACK* SET GF_UNPACK_FOUND=1
IF %GF_UNPACK_FOUND%.==1. ECHO %1\UNPACK2 %1\FIX\OS2\UNPACK* %GF_TARGET%
IF %GF_UNPACK_FOUND%.==1. %1\UNPACK2 %1\FIX\OS2\UNPACK* %GF_TARGET%
REM
IF %GF_UNPACK_FOUND%.==. IF EXIST %1\UNPACK.EXE IF EXIST %1\FIX\OS2\UNPACK* SET GF_UNPACK_FOUND=2
IF %GF_UNPACK_FOUND%.==2. ECHO %1\UNPACK %1\FIX\OS2\UNPACK* %GF_TARGET%
IF %GF_UNPACK_FOUND%.==2. %1\UNPACK %1\FIX\OS2\UNPACK* %GF_TARGET%
REM
IF EXIST %GF_TARGET%\UNPACK.EXE SET GF_UNPACK=%GF_TARGET%
IF %GF_UNPACK%.==. IF EXIST %1\UNPACK.EXE SET GF_UNPACK=%1
IF %GF_UNPACK%.==. COPY %1\UNPACK.EXE
IF %GF_UNPACK%.==. COPY %GF_TARGET%\UNPACK.EXE
IF %GF_UNPACK%.==. GOTO END
REM
SET PATH=%GF_UNPACK%;%PATH%
SET GF_UNPACK=%GF_UNPACK%\UNPACK
REM
:UNPACK
REM UNPACK ALL POSSIBLIE CID FILES IF THEY EXIST
REM
ECHO %GF_UNPACK% %1\FIX\OS2
FOR %%I IN (RSPINST SEINST SEMAINT SEIMAGE SEDISK SETBOOT XCOPY) DO IF EXIST %1\FIX\OS2\%%I.* %GF_UNPACK% %1\FIX\OS2\%%I.* %GF_TARGET%
:END
ENDLOCAL