Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Nov 4, 2024
1 parent 62645bb commit f4ee98e
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions ush/submodules/update_develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
# update specified repositories to most recent develop hash

# submodules not to be updated
excluded_repos=()
#excluded_repos=("parm/jcb-gdas") # example
excluded_repos="
sorc/crtm
sorc/jedicmake
sorc/gsw
sorc/fv3-jedi-lm
sorc/femps
sorc/icepack
"

# get list of all submodules
repos=$(git submodule --quiet foreach 'echo $name')
Expand All @@ -18,7 +24,15 @@ git submodule update --init --no-fetch

# update submodules to develop
for r in $repos; do
if [[ ! "${excluded_repos[@]}" =~ "${r}" ]]; then
# Check if submodule is meant to be exclude from update
exclude=0
for er in $excluded_repos; do
if [[ "${er}" == "${r}" ]]; then
exclude=1
fi
done

if [[ $exclude == 0 ]]; then
cd ${gdasdir}

# Update each submodule to develop on its respective remote repo
Expand Down

0 comments on commit f4ee98e

Please sign in to comment.