This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved script to clone gitlab repos
- Loading branch information
1 parent
8064d90
commit 8a60857
Showing
1 changed file
with
132 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,153 @@ | ||
#!/bin/bash | ||
# | ||
# clone or update the verification documents | ||
# clone or update verification documents | ||
# and data from instruments | ||
# | ||
TDIR=$(pwd) | ||
|
||
pull_or_clone() | ||
{ | ||
if [[ -e "$1" ]]; then | ||
PDIR=$(pwd) | ||
cd "$1" || exit | ||
git pull | ||
cd "${TDIR}" || exit | ||
cd "${PDIR}" || exit | ||
else | ||
git clone [email protected]:cta-science/simulations/simulation-model/"${2}" | ||
fi | ||
} | ||
|
||
echo "Model configuration" | ||
# (appendices) | ||
clone_verification_process() | ||
{ | ||
mkdir -p verification-process | ||
cd verification-process || exit | ||
|
||
# pull_or_clone "simulation-model-description" "simulation-model-description.git" | ||
FF=( lst mst-structure mst-flashcam mst-nectarcam sites sst-1m sst-2m-astri sst-2m-gct-s sst-2m-gct-structure sst-structure sst-camera sct ) | ||
for F in "${FF[@]}" | ||
do | ||
echo "Checking $F" | ||
pull_or_clone "$F" "verification/verification-process/${F}.git" | ||
done | ||
cd "$TDIR" || exit | ||
} | ||
|
||
echo "Verification process" | ||
clone_data_project() | ||
{ | ||
DIRLIST=("$@") | ||
TELSYS="${DIRLIST[0]}" | ||
mkdir -p data-from-instrument-teams/"$TELSYS" | ||
cd data-from-instrument-teams/"$TELSYS" || exit | ||
echo | ||
echo "---------------------------------" | ||
echo "TELESCOPE SYSTEM $TELSYS" | ||
for F in "${DIRLIST[@]:1}" | ||
do | ||
echo "Checking $F" | ||
pull_or_clone "$F" "verification/data-from-instrument-teams/$TELSYS/${F}" | ||
done | ||
cd "$TDIR" || exit | ||
} | ||
|
||
mkdir -p verification-process | ||
cd verification-process || exit | ||
clone_lst_optics() | ||
{ | ||
MSTS=( psf-lst-1 window-transmission psf mirror-lists focal-lengths single-mirror-psf psf-and-focal-lengths-slides mirror-reflectivity lightguide budget ) | ||
clone_data_project "lst/optics" "${MSTS[@]}" | ||
} | ||
|
||
FF=( lst mst-structure mst-flashcam mst-nectarcam sites sst-1m sst-2m-astri sst-2m-gct-s sst-2m-gct-structure sst-structure sst-camera sct ) | ||
FF=( sst-structure sst-camera sct ) | ||
for F in "${FF[@]}" | ||
do | ||
echo "Checking $F" | ||
# pull_or_clone "$F" "verification/verification-process/${F}.git" | ||
done | ||
cd "$TDIR" || exit | ||
clone_lst_camera() | ||
{ | ||
MSTS=( transit-time pde spe pulse-shape pedestals collection-efficiency ) | ||
clone_data_project "lst/camera" "${MSTS[@]}" | ||
} | ||
|
||
echo "Data from instrument teams" | ||
clone_lst_trigger() | ||
{ | ||
MSTS=( documentation ) | ||
clone_data_project "lst/trigger" "${MSTS[@]}" | ||
} | ||
|
||
clone_mst_structure() | ||
{ | ||
MSTS=( single-mirror-psf shadowing mirror-layout ) | ||
clone_data_project "mst-structure" "${MSTS[@]}" | ||
} | ||
|
||
clone_mst_nectarcam() | ||
{ | ||
MSTS=( trigger single-pe pulse-shape pixel-layout night-sky-background light-cones ) | ||
clone_data_project "mst-nectarcam" "${MSTS[@]}" | ||
} | ||
|
||
clone_mst_flashcam() | ||
{ | ||
MSTS=( trigger single-pe pulse-shape lightguide quantum-efficiency ) | ||
clone_data_project "mst-flashcam" "${MSTS[@]}" | ||
} | ||
|
||
clone_sst_harmonization() | ||
{ | ||
MSTS=( spe sipm ) | ||
clone_data_project "sst-harmonization" "${MSTS[@]}" | ||
} | ||
|
||
## MST structure | ||
MSTS=( single-mirror-psf shadowing mirror-layout ) | ||
|
||
TELSYS="mst-structure" | ||
mkdir -p data-from-instrument-teams/"$TELSYS" | ||
cd data-from-instrument-teams/"$TELSYS" || exit | ||
for F in "${MSTS[@]}" | ||
do | ||
echo "Checking $F" | ||
pull_or_clone "${F}" "verification/data-from-instrument-teams/$TELSYS/${F}" | ||
done | ||
cd "$TDIR" || exit | ||
|
||
## MST NectarCam | ||
TELSYS="mst-nectarcam" | ||
MSTS=( trigger single-pe pulse-shape pixel-layout night-sky-backround light-cones ) | ||
mkdir -p data-from-instrument-teams/"$TELSYS" | ||
cd data-from-instrument-teams/"$TELSYS" || exit | ||
for F in "${MSTS[@]}" | ||
do | ||
echo "Checking $F" | ||
pull_or_clone "$F" "verification/data-from-instrument-teams/$TELSYS/${F}" | ||
done | ||
cd "$TDIR" || exit | ||
|
||
## MST FlashCam | ||
TELSYS="mst-flashcam" | ||
MSTS=( trigger single-pe pulse-shape lightguide quantum-efficiency ) | ||
mkdir -p data-from-instrument-teams/"$TELSYS" | ||
cd data-from-instrument-teams/"$TELSYS" || exit | ||
for F in "${MSTS[@]}" | ||
do | ||
echo "Checking $F" | ||
pull_or_clone "$F" "verification/data-from-instrument-teams/$TELSYS/${F}" | ||
done | ||
cd "$TDIR" || exit | ||
clone_sst_structure() | ||
{ | ||
MSTS=( incidence-angle-focal-plane robast-model ) | ||
clone_data_project "sst-structure" "${MSTS[@]}" | ||
} | ||
|
||
clone_sst_1m() | ||
{ | ||
MSTS=( trigger pulse-shape mirror-reflectivity general-documents camera-filter quantum-efficiency nsb-studies ) | ||
clone_data_project "sst-1m" "${MSTS[@]}" | ||
} | ||
|
||
clone_gct_camera() | ||
{ | ||
MSTS=( camera ) | ||
clone_data_project "gct" "${MSTS[@]}" | ||
} | ||
|
||
clone_gct_optics() | ||
{ | ||
MSTS=( mirror-reflectivity general-docs effective-mirror-area psf ) | ||
clone_data_project "gct/optics" "${MSTS[@]}" | ||
} | ||
|
||
clone_astri() | ||
{ | ||
MSTS=( trigger-simulations trigger-logic transmission-silica-filter single-pe shapers prototype-optics pedestals first-data final-design-optics coordinates pde nsb ) | ||
clone_data_project "astri" "${MSTS[@]}" | ||
} | ||
|
||
clone_sct_optics() | ||
{ | ||
MSTS=( psf ) | ||
clone_data_project "sct/optics" "${MSTS[@]}" | ||
} | ||
|
||
clone_sct_camera() | ||
{ | ||
MSTS=( window-transmission pde ) | ||
clone_data_project "sct/camera" "${MSTS[@]}" | ||
} | ||
|
||
echo "Verification process" | ||
clone_verification_process | ||
|
||
echo "Data from instrument teams" | ||
clone_lst_camera | ||
clone_lst_trigger | ||
clone_lst_optics | ||
clone_mst_structure | ||
clone_mst_nectarcam | ||
clone_mst_flashcam | ||
clone_sst_harmonization | ||
clone_sst_structure | ||
clone_sst_1m | ||
clone_gct_camera | ||
clone_gct_optics | ||
clone_astri | ||
clone_sct_optics | ||
clone_sct_camera |