ECHO OFF
rem
rem  reconfig - reconfigure autoexec and config.sys files
rem  Copyright (c) 1986, 1988 by Karl Freburger and Dave Donegan
rem  All rights reserved.
rem
set configdir=\configs
if not exist %dir%\*.aut set configdir=c:\configs
if not "%1" == "" goto doit
echo Usage:  reconfig type [noboot]
echo noboot, if present, means do not reboot after reconfiguring.
goto listcfgs

:doit
if not exist %configdir%\%1.aut goto fail
if not exist %configdir%\%1.con goto fail
echo Configuring for %1
copy %configdir%\%1.aut c:\autoexec.bat
copy %configdir%\%1.con c:\config.sys
if "%2" == "" reboot
echo You must reboot to have the changes take effect.
goto endit

:fail
echo.
echo Cannot use %1 as a type.  %1.aut or %1.con is missing.

:listcfgs
dir %configdir%\*.aut

:endit
set dir=
