From 8d96ea4a870198b254a2cbbc9933a61acc0a3f21 Mon Sep 17 00:00:00 2001 From: Cory Martin Date: Mon, 18 Mar 2024 16:05:10 -0400 Subject: [PATCH] Submodule helper scripts --- ush/submodules/add_submodules.sh | 24 ++++++++++++++++++++++++ ush/submodules/update_develop.sh | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 ush/submodules/add_submodules.sh create mode 100755 ush/submodules/update_develop.sh diff --git a/ush/submodules/add_submodules.sh b/ush/submodules/add_submodules.sh new file mode 100755 index 0000000..da94408 --- /dev/null +++ b/ush/submodules/add_submodules.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# add_submodules.sh +# add submodules to the git commit + +my_dir="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" + +rdasdir=${1:-${my_dir}/../../} + +repos=" +oops +vader +saber +ioda +ufo +fv3-jedi +mpas-jedi +iodaconv +" + +for r in $repos; do + echo "Adding ${rdasdir}/sorc/${r}" + cd ${rdasdir}/sorc + git add ${r} +done diff --git a/ush/submodules/update_develop.sh b/ush/submodules/update_develop.sh new file mode 100755 index 0000000..45d3e21 --- /dev/null +++ b/ush/submodules/update_develop.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# update_develop.sh +# update specified repositories to most recent develop hash + +repos=" +oops +vader +saber +ioda +ufo +fv3-jedi +mpas-jedi +iodaconv +" + +my_dir="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" + +rdasdir=${1:-${my_dir}/../../} + +for r in $repos; do + echo "Updating ${rdasdir}/sorc/${r}" + cd ${rdasdir}/sorc + git submodule update --remote --merge ${r} +done