From 789e4db6473bcb6a5cbc03e05207c830b8a16f64 Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 31 Oct 2022 14:10:45 -0400 Subject: [PATCH] added push all subtrees script w/ burnettk --- bin/push_all_subtrees | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/push_all_subtrees diff --git a/bin/push_all_subtrees b/bin/push_all_subtrees new file mode 100755 index 000000000..09e4e5dca --- /dev/null +++ b/bin/push_all_subtrees @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +function error_handler() { + >&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}." + exit "$2" +} +trap 'error_handler ${LINENO} $?' ERR +set -o errtrace -o errexit -o nounset -o pipefail + +script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +subtrees=$("${script_dir}/get_subtree_prefixes") + +for subtree in $subtrees ; do + echo -e "\n$subtree" + "${script_dir}/push_subtree" "$subtree" +done