1
0
mirror of https://github.com/pConst/basic_verilog.git synced 2025-01-14 06:42:54 +08:00

Straight and simple realization of recursive scripts

This commit is contained in:
Konstantin Pavlov 2022-06-16 06:59:32 +03:00
parent 783c33e268
commit 49fefc9bf0
7 changed files with 139 additions and 47 deletions

View File

@ -11,6 +11,7 @@
*.cache
*.hw
*.ip_user_files
*.runs
*.sim
.Xil
@ -18,4 +19,5 @@
*.jou
*.log
*.str
*.tmp

View File

@ -7,38 +7,46 @@ rem ----------------------------------------------------------------------------
rem Use this file as a boilerplate for your custom clean script
rem for Quartus projects
SET PROJ=test
rem Common junk files
del /s /q .\%PROJ%.qws
del /s /q .\c5_pin_model_dump.txt
del /s /q .\%PROJ%.ipregen.rpt
del /s /f /q .\.qsys_edit\*
rmdir /s /q .\.qsys_edit\
del /s /q .\%PROJ%_assignment_defaults.qdf
for /R %%f in (*.qpf) do (
echo "Project name is %%~nf"
rem Compilation databases
del /s /f /q .\db\*
rmdir /s /q .\db\
del /s /f /q .\incremental_db\*
rmdir /s /q .\incremental_db\
del /s /f /q .\greybox_tmp\*
rmdir /s /q .\greybox_tmp\
rem Common junk files
del /s /q .\%%~nf.qws
del /s /q .\c5_pin_model_dump.txt
del /s /q .\%%~nf.ipregen.rpt
del /s /f /q .\.qsys_edit\*
rmdir /s /q .\.qsys_edit\
del /s /q .\%%~nf_assignment_defaults.qdf
rem Output directory
del /s /f /q .\out\*
rmdir /s /q .\out\
rem Compilation databases
del /s /f /q .\db\*
rmdir /s /q .\db\
del /s /f /q .\incremental_db\*
rmdir /s /q .\incremental_db\
del /s /f /q .\greybox_tmp\*
rmdir /s /q .\greybox_tmp\
rem Design space explorer files
del /s /f /q .\dse\*
rmdir /s /q .\dse\
del /s /q .\dse1_base.qpf
del /s /q .\dse1_base.qsf
del /s /q .\%PROJ%.dse.rpt
del /s /q .\%PROJ%.archive.rpt
rem Output directory
del /s /f /q .\out\*
rmdir /s /q .\out\
del /s /f /q .\output\*
rmdir /s /q .\output\
del /s /f /q .\OUTPUT\*
rmdir /s /q .\OUTPUT\
rem Early power estimator files
del /s /q .\%PROJ%_early_pwr.csv
rem Design space explorer files
del /s /f /q .\dse\*
rmdir /s /q .\dse\
del /s /q .\dse1_base.qpf
del /s /q .\dse1_base.qsf
del /s /q .\%%~nf.dse.rpt
del /s /q .\%%~nf.archive.rpt
rem Early power estimator files
del /s /q .\%%~nf_early_pwr.csv
)
pause
goto :eof

View File

@ -21,7 +21,7 @@ echo INFO: The script may sometimes take a long time to complete
for /R /d %%D in (*) do (
echo %%~fD
rem echo %%~fD
cd %%~fD
if exist clean.bat @echo | call clean.bat

View File

@ -9,26 +9,33 @@ rem Use this file as a boilerplate for your custom clean script
rem for Vivado/Vitis projects
SET PROJ=test
for /R %%f in (*.xpr) do (
echo "Project name is %%~nf"
del /s /f /q .\%PROJ%.cache\*
rmdir /s /q .\%PROJ%.cache\
del /s /f /q .\%%~nf.cache\*
rmdir /s /q .\%%~nf.cache\
del /s /f /q .\%PROJ%.hw\*
rmdir /s /q .\%PROJ%.hw\
del /s /f /q .\%%~nf.hw\*
rmdir /s /q .\%%~nf.hw\
rem del /s /f /q .\%PROJ%.runs\*
rem rmdir /s /q .\%PROJ%.runs\
del /s /f /q .\%%~nf.ip_user_files\*
rmdir /s /q .\%%~nf.ip_user_files\
del /s /f /q .\%PROJ%.sim\*
rmdir /s /q .\%PROJ%.sim\
del /s /f /q .\%%~nf.runs\*
rmdir /s /q .\%%~nf.runs\
del /s /f /q .\.Xil\*
rmdir /s /q .\.Xil\
del /s /f /q .\%%~nf.sim\*
rmdir /s /q .\%%~nf.sim\
del /s /f /q .\*.jou
del /s /f /q .\*.log
del /s /f /q .\*.str
del /s /f /q .\.Xil\*
rmdir /s /q .\.Xil\
del /s /f /q .\*.jou
del /s /f /q .\*.log
del /s /f /q .\*.str
del /s /f /q .\*.tmp
)
pause
goto :eof

View File

@ -0,0 +1,31 @@
@echo off
rem ------------------------------------------------------------------------------
rem cp_recursively.bat
rem published as part of https://github.com/pConst/basic_verilog
rem Konstantin Pavlov, pavlovconst@gmail.com
rem ------------------------------------------------------------------------------
rem Use this script to walk through all subdirs and update files with
rem specific names to the latest version
echo INFO: =====================================================================
echo INFO: cp_recursively.bat
echo INFO: The script may sometimes take a long time to complete
for /R /d %%D in (*) do (
rem echo %%~fD
cd %%~fD
if exist clean_recursively.bat cp -dv j:\basic_verilog\scripts\clean_recursively.bat .\clean_recursively.bat
if exist clean_quartus.bat cp -dv j:\basic_verilog\scripts\clean_quartus.bat .\clean_quartus.bat
if exist clean_vivado.bat cp -dv j:\basic_verilog\scripts\clean_vivado.bat .\clean_vivado.bat
if exist clean_gowin.bat cp -dv j:\basic_verilog\scripts\clean_gowin.bat .\clean_gowin.bat
if exist clean_modelsim.bat cp -dv j:\basic_verilog\scripts\clean_modelsim.bat .\clean_modelsim.bat
)
pause
goto :eof

View File

@ -0,0 +1,44 @@
@echo off
rem ----------------------------------------------------------------------------
rem git_pull_subdirs.bat
rem published as part of https://github.com/pConst/basic_verilog
rem Konstantin Pavlov, pavlovconst@gmail.com
rem ----------------------------------------------------------------------------
rem Use this script to walk through all subdirs and perform git pull there
rem ===========================================================================
rem !! CAUTION! All repos will be reset and all uncommitted changes lost !!
rem ===========================================================================
echo INFO: =====================================================================
echo INFO: git_pull_subdirs.bat
echo INFO: The script may sometimes take a long time to complete
for /R /d %%D in (*) do (
rem echo %%~fD
cd %%~fD
if exist .git (
rem Skip pulling submodules
if not exist ../.gitmodules (
echo:
echo %%~fD
rem git reset --hard
rem git submodule init
rem git submodule update
rem git fetch --all
rem git pull --recurse-submodules --all
git pull --all
)
)
)
pause
goto :eof

View File

@ -8,14 +8,14 @@
# ===========================================================================
# !! CAUTION! All repos will be reset and all uncommitted changes lost !!
# ===========================================================================
#
# see git_pull_subdirs.bat for mode convinient and clever script variant
#
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
eval $(ssh-agent)
ssh-add
find . -maxdepth 2 -type d -exec git -C {} reset --hard \;
find . -maxdepth 2 -type d -exec git -C {} submodule init \;
find . -maxdepth 2 -type d -exec git -C {} submodule update \;
find . -maxdepth 2 -type d -exec echo {} ' ' \; -exec git -C {} pull \;
find . -type d -exec echo {} ' ' \; -exec git -C {} reset --hard \;
find . -type d -exec echo {} ' ' \; -exec git -C {} pull --recurse-submodules --all \;