Files
yttrium-virtio-gpu/NetKVM/clean.bat
T
benyamin-codez 04f589ff88 [build] Scrub the cleaners
a) Standardised cleaner routines
b) Introduced -quiet and -debug parameters when run from repo root
c) Moved from FOR loop to a shift loop to more reliably support a
   wider variety of directory formats and characters
d) Created NetKVM/clean_inx.cmd to delete *.inx files in NetKVM
e) Updated NetKVM/clean_dvl_log.cmd to use standardised routines
f) Moved all other custom clean operations to build/clean.bat
g) Added missing cleaner to viocrypt
h) Added missing entries for viomem and viocrypt to list of
   directories to clean

Signed-off-by: benyamin-codez <[email protected]>
2025-01-05 15:47:01 +01:00

42 lines
852 B
Batchfile

@echo off
set _cln_tgt_=NetKVM
set _cln_subdirs_=CoInstaller Mof NotifyObject ProtocolService
call clean_dvl_log.cmd
call clean_inx.cmd
call ..\build\clean.bat
call :subdir %_cln_subdirs_%
goto :eof
:subdir
if "%~1"=="" goto :eof
call :do_clean %1
shift
goto :subdir
:do_clean
echo Cleaning %_cln_tgt_% ^| %~1 ...
if not exist "%~dp0%~1" (
echo The %_cln_tgt_%^\%~1 directory was not available for cleaning.
goto :eof
)
pushd "%~dp0%~1"
if exist ".\cleanall.bat" (
call cleanall.bat
) else (
if exist ".\clean.bat" (
call clean.bat
) else (
if exist "..\..\build\clean.bat" (
call ..\..\build\clean.bat
) else (
if exist "..\..\..\build\clean.bat" (
call ..\..\..\build\clean.bat
) else (
echo A cleaner for the %_cln_tgt_%^\%~1 directory could not be found.
)
)
)
)
popd
goto :eof