From e732ca591713022b0da05d8599303294f140683d Mon Sep 17 00:00:00 2001 From: Mark Ito Date: Wed, 3 Nov 2021 12:18:55 -0400 Subject: [PATCH] moves header files --- hdi_conversion/convert_halld_recon.sh | 5 +++-- hdi_conversion/filter.txt | 12 ++++++++++++ hdi_conversion/move_h.sh | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100755 hdi_conversion/move_h.sh diff --git a/hdi_conversion/convert_halld_recon.sh b/hdi_conversion/convert_halld_recon.sh index 9c152a0..6e05933 100755 --- a/hdi_conversion/convert_halld_recon.sh +++ b/hdi_conversion/convert_halld_recon.sh @@ -1,7 +1,7 @@ #!/bin/bash hd_interface=/home/marki/git/hd_interface hdi_conversion=/home/marki/git/hd_utilities/hdi_conversion -rm -rf halld_recon h_to_move.txt +rm -rf halld_recon git clone git@github.com:jeffersonlab/halld_recon #cp -pr halld_recon.save halld_recon # instead of clone for testing to save time cd halld_recon @@ -13,7 +13,8 @@ git branch| awk '{print "git branch -D "$1}' | bash | grep -v "Deleted branch" git mv src old_src git commit -m "src moved to old_src" | grep -v "rename" find $hd_interface -type f -name \*.cc | $hdi_conversion/move_cc.sh -find $hd_interface -type f -name \*.h > ../h_to_move.txt +find $hd_interface -type f -name \*.h | $hdi_conversion/move_h.sh +exit git commit -m "move done" | grep -v "rename" git rm -r old_src | grep -v "rm " git commit -m "old_src deleted" | grep -v "delete mode" diff --git a/hdi_conversion/filter.txt b/hdi_conversion/filter.txt index 2001fe4..7ce8a61 100644 --- a/hdi_conversion/filter.txt +++ b/hdi_conversion/filter.txt @@ -1,15 +1,27 @@ src/libraries/include src/libraries/BCAL src/libraries/CCAL +src/libraries/CDC +src/libraries/CERE src/libraries/DANA +src/libraries/DAQ src/libraries/DIRC src/libraries/EVENTSTORE src/libraries/FCAL +src/libraries/FDC +src/libraries/FMWPC +src/libraries/HDDM src/libraries/HDGEOMETRY +src/libraries/KINFITTER src/libraries/PAIR_SPECTROMETER src/libraries/PID +src/libraries/RF src/libraries/START_COUNTER +src/libraries/TAC src/libraries/TAGGER src/libraries/TOF +src/libraries/TPOL src/libraries/TRACKING +src/libraries/TRD +src/libraries/TRIGGER src/libraries/TTAB diff --git a/hdi_conversion/move_h.sh b/hdi_conversion/move_h.sh new file mode 100755 index 0000000..bb41052 --- /dev/null +++ b/hdi_conversion/move_h.sh @@ -0,0 +1,16 @@ +#!/bin/bash +while read line +do + command=`echo $line | awk -F'/include/' '{print "full_path="$2}'` + eval $command + if [[ $full_path =~ / ]] + then + command=`echo $full_path | awk -F/ '{print "dir="$1}'` + eval $command + mkdir -p include/$dir + git mv old_src/libraries/$full_path include/$full_path + else + mkdir -p include + git mv old_src/libraries/include/$full_path include/$full_path + fi +done