1
0
mirror of https://github.com/pConst/basic_verilog.git synced 2025-02-04 07:12:56 +08:00
basic_verilog/scripts/clean_recursively.bat
2021-10-28 11:46:38 +03:00

63 lines
1.7 KiB
Batchfile
Executable File

@echo off
rem ------------------------------------------------------------------------------
rem clean_recursively.bat
rem Konstantin Pavlov, pavlovconst@gmail.com
rem ------------------------------------------------------------------------------
rem Use this script to walk through all subdirs and execute cleaning scripts
rem there. Place cleaning script in every sybdir that requires cleaning.
rem Cleaning script names supported
rem - clean.bat (custom one)
rem - clean_quartus.bat (special script for quartus project dirs)
rem - clean_vivado.bat (special script for vivado project dirs)
rem - clean_modelsim.bat (special script for modelsim testbench dirs)
echo INFO: =====================================================================
echo INFO: clean_recursively.bat
echo INFO: The script may sometimes take a long time to complete
for /R %%f in (*) do (
echo %%f | findstr /C:".git" >nul & if ERRORLEVEL 1 (
echo %%f | findstr /C:"clean\.bat" >nul & if ERRORLEVEL 1 (
rem
) else (
pushd %%~df%%~pf
echo %%~df%%~pf
@echo | call %%f
popd
)
echo %%f | findstr /C:"clean\_quartus\.bat" >nul & if ERRORLEVEL 1 (
rem
) else (
pushd %%~df%%~pf
echo %%~df%%~pf
@echo | call %%f
popd
)
echo %%f | findstr /C:"clean\_vivado\.bat" >nul & if ERRORLEVEL 1 (
rem
) else (
pushd %%~df%%~pf
echo %%~df%%~pf
@echo | call %%f
popd
)
echo %%f | findstr /C:"clean\_modelsim\.bat" >nul & if ERRORLEVEL 1 (
rem
) else (
pushd %%~df%%~pf
echo %%~df%%~pf
@echo | call %%f
popd
)
)
)
pause
goto :eof