mirror of
https://github.com/pConst/basic_verilog.git
synced 2025-02-04 07:12:56 +08:00
Straight and simple realization of recursive scripts
This commit is contained in:
parent
783c33e268
commit
49fefc9bf0
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
*.cache
|
*.cache
|
||||||
*.hw
|
*.hw
|
||||||
|
*.ip_user_files
|
||||||
*.runs
|
*.runs
|
||||||
*.sim
|
*.sim
|
||||||
.Xil
|
.Xil
|
||||||
@ -18,4 +19,5 @@
|
|||||||
*.jou
|
*.jou
|
||||||
*.log
|
*.log
|
||||||
*.str
|
*.str
|
||||||
|
*.tmp
|
||||||
|
|
||||||
|
@ -7,38 +7,46 @@ rem ----------------------------------------------------------------------------
|
|||||||
rem Use this file as a boilerplate for your custom clean script
|
rem Use this file as a boilerplate for your custom clean script
|
||||||
rem for Quartus projects
|
rem for Quartus projects
|
||||||
|
|
||||||
SET PROJ=test
|
|
||||||
|
|
||||||
rem Common junk files
|
for /R %%f in (*.qpf) do (
|
||||||
del /s /q .\%PROJ%.qws
|
echo "Project name is %%~nf"
|
||||||
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
|
|
||||||
|
|
||||||
rem Compilation databases
|
rem Common junk files
|
||||||
del /s /f /q .\db\*
|
del /s /q .\%%~nf.qws
|
||||||
rmdir /s /q .\db\
|
del /s /q .\c5_pin_model_dump.txt
|
||||||
del /s /f /q .\incremental_db\*
|
del /s /q .\%%~nf.ipregen.rpt
|
||||||
rmdir /s /q .\incremental_db\
|
del /s /f /q .\.qsys_edit\*
|
||||||
del /s /f /q .\greybox_tmp\*
|
rmdir /s /q .\.qsys_edit\
|
||||||
rmdir /s /q .\greybox_tmp\
|
del /s /q .\%%~nf_assignment_defaults.qdf
|
||||||
|
|
||||||
rem Output directory
|
rem Compilation databases
|
||||||
del /s /f /q .\out\*
|
del /s /f /q .\db\*
|
||||||
rmdir /s /q .\out\
|
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
|
rem Output directory
|
||||||
del /s /f /q .\dse\*
|
del /s /f /q .\out\*
|
||||||
rmdir /s /q .\dse\
|
rmdir /s /q .\out\
|
||||||
del /s /q .\dse1_base.qpf
|
del /s /f /q .\output\*
|
||||||
del /s /q .\dse1_base.qsf
|
rmdir /s /q .\output\
|
||||||
del /s /q .\%PROJ%.dse.rpt
|
del /s /f /q .\OUTPUT\*
|
||||||
del /s /q .\%PROJ%.archive.rpt
|
rmdir /s /q .\OUTPUT\
|
||||||
|
|
||||||
rem Early power estimator files
|
rem Design space explorer files
|
||||||
del /s /q .\%PROJ%_early_pwr.csv
|
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
|
pause
|
||||||
goto :eof
|
goto :eof
|
||||||
|
@ -21,7 +21,7 @@ echo INFO: The script may sometimes take a long time to complete
|
|||||||
|
|
||||||
for /R /d %%D in (*) do (
|
for /R /d %%D in (*) do (
|
||||||
|
|
||||||
echo %%~fD
|
rem echo %%~fD
|
||||||
cd %%~fD
|
cd %%~fD
|
||||||
|
|
||||||
if exist clean.bat @echo | call clean.bat
|
if exist clean.bat @echo | call clean.bat
|
||||||
|
@ -9,26 +9,33 @@ rem Use this file as a boilerplate for your custom clean script
|
|||||||
rem for Vivado/Vitis projects
|
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\*
|
del /s /f /q .\%%~nf.cache\*
|
||||||
rmdir /s /q .\%PROJ%.cache\
|
rmdir /s /q .\%%~nf.cache\
|
||||||
|
|
||||||
del /s /f /q .\%PROJ%.hw\*
|
del /s /f /q .\%%~nf.hw\*
|
||||||
rmdir /s /q .\%PROJ%.hw\
|
rmdir /s /q .\%%~nf.hw\
|
||||||
|
|
||||||
rem del /s /f /q .\%PROJ%.runs\*
|
del /s /f /q .\%%~nf.ip_user_files\*
|
||||||
rem rmdir /s /q .\%PROJ%.runs\
|
rmdir /s /q .\%%~nf.ip_user_files\
|
||||||
|
|
||||||
del /s /f /q .\%PROJ%.sim\*
|
del /s /f /q .\%%~nf.runs\*
|
||||||
rmdir /s /q .\%PROJ%.sim\
|
rmdir /s /q .\%%~nf.runs\
|
||||||
|
|
||||||
del /s /f /q .\.Xil\*
|
del /s /f /q .\%%~nf.sim\*
|
||||||
rmdir /s /q .\.Xil\
|
rmdir /s /q .\%%~nf.sim\
|
||||||
|
|
||||||
del /s /f /q .\*.jou
|
del /s /f /q .\.Xil\*
|
||||||
del /s /f /q .\*.log
|
rmdir /s /q .\.Xil\
|
||||||
del /s /f /q .\*.str
|
|
||||||
|
del /s /f /q .\*.jou
|
||||||
|
del /s /f /q .\*.log
|
||||||
|
del /s /f /q .\*.str
|
||||||
|
del /s /f /q .\*.tmp
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
pause
|
pause
|
||||||
goto :eof
|
goto :eof
|
||||||
|
31
scripts/cp_recursively.bat
Normal file
31
scripts/cp_recursively.bat
Normal 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
|
||||||
|
|
44
scripts/git_pull_subdirs.bat
Normal file
44
scripts/git_pull_subdirs.bat
Normal 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
|
||||||
|
|
@ -8,14 +8,14 @@
|
|||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# !! CAUTION! All repos will be reset and all uncommitted changes lost !!
|
# !! 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
|
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||||
|
|
||||||
eval $(ssh-agent)
|
eval $(ssh-agent)
|
||||||
ssh-add
|
ssh-add
|
||||||
|
|
||||||
find . -maxdepth 2 -type d -exec git -C {} reset --hard \;
|
find . -type d -exec echo {} ' ' \; -exec git -C {} reset --hard \;
|
||||||
find . -maxdepth 2 -type d -exec git -C {} submodule init \;
|
find . -type d -exec echo {} ' ' \; -exec git -C {} pull --recurse-submodules --all \;
|
||||||
find . -maxdepth 2 -type d -exec git -C {} submodule update \;
|
|
||||||
|
|
||||||
find . -maxdepth 2 -type d -exec echo {} ' ' \; -exec git -C {} pull \;
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user