From f4ee98e964ef8d96c9d2f8c7b3b43d9295132ce2 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 4 Nov 2024 18:38:37 +0000 Subject: [PATCH] Bug fix --- ush/submodules/update_develop.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ush/submodules/update_develop.sh b/ush/submodules/update_develop.sh index 799c468b3..4d94f256d 100755 --- a/ush/submodules/update_develop.sh +++ b/ush/submodules/update_develop.sh @@ -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') @@ -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