@if %1.==A:. goto DRIVEOK
@if %1.==a:. goto DRIVEOK
@if %1.==B:. goto DRIVEOK
@if %1.==b:. goto DRIVEOK
@goto USAGE
:DRIVEOK
@echo.
@echo Four blank floppy diskettes are required to make copies of the GNAT
@echo distribution on floppies.
@echo.
@PAUSE
@if not exist \emx\temp mkdir \emx\temp
@cd \emx\temp
@if exist gnat.zip erase gnat.zip

@zip -9r gnat.zip \emx\bin\gnat*.exe \emx\bin\cc.cmd \emx\bin\fly-gnat.cmd \emx\bin\gnat.cmd \emx\bin\gnatchop.cmd \emx\bin\makefloppies.cmd \emx\bin\unzip.exe \emx\bin\zipsplit.exe \emx\bin\zip.exe \emx\lib\gnat.a \emx\gnatlib \emx\gnat\gnat*.* \emx\gnat\features \emx\gnat\COPYING* \emx\gnat\examples \emx\gnat\Openbugs.txt \emx\gnat\read.me \emx\gnat\readme.emx \emx\gnat\unpack.doc \emx\lib\gcc.a -x \emx\gnat\examples\*.o \emx\gnat\examples\*.ali \emx\gnat\examples\*.exe
@zipsplit -n 1457664 gnat.zip
@zip gnat2.zip \gnatdel.cmd
@echo Please insert blank formatted floppy #1 in floppy drive then
@pause
copy gnat1.zip   %1
@echo Please insert blank formatted floppy #2 in floppy drive then
@pause
copy gnat2.zip   %1
copy \emx\bin\unzip.exe	   %1
copy \emx\gnat\unpack.doc  %1
@erase gnat.zip
@erase gnat1.zip
@erase gnat2.zip

@if exist emx09a.zip erase emx09a.zip
@if not exist \emx\readme.emx copy \emx\gnat\readme.emx \emx\readme.emx
@zip -9r emx09a.zip \emx\readme.emx \emx\bin\ar.exe \emx\bin\as.exe \emx\bin\cc1.exe \emx\bin\cpp.exe \emx\bin\emxl.exe \emx\bin\emxaout.exe \emx\bin\emxbind.exe \emx\bin\emxexp.exe \emx\bin\emximp.exe \emx\bin\emxload.exe \emx\bin\emxrev.cmd \emx\bin\emxstack.exe \emx\bin\gasp.exe \emx\bin\gcc.exe \emx\bin\gdb.exe \emx\bin\ld.exe \emx\bin\nm.exe  \emx\dll \emx\doc \emx\include \emx\lib \emx\etc\termcap.dat -x \emx\lib\gnat.a \emx\lib\gcc.a

@zipsplit -n 1457664 emx09a.zip
@echo.
@echo Please insert blank formatted floppy #3 in floppy drive then
@pause
copy emx09a1.zip   %1
@echo Please insert blank formatted floppy #4 in floppy drive then
@pause
copy emx09a2.zip   %1
copy \emx\gnat\readme.emx   %1
@echo off
@erase emx09a.zip
@erase emx09a1.zip
@erase emx09a2.zip
@echo.
@echo Making floppy distribution done.
goto END
:USAGE
@echo off
@echo This batch file must be invoked as follows:
@echo    makefloppies x:
@echo where x: is the name of your floppy drive (a: or b:).
:END


