From 12b28dae2412be0f3ae2ef2e6858a00b80191922 Mon Sep 17 00:00:00 2001 From: Tristan Ancelet Date: Tue, 7 Nov 2023 14:50:48 -0600 Subject: [PATCH] Made convience script to update all project (root proj, and all submodules) and push to repos --- utils/update-repos.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 utils/update-repos.sh diff --git a/utils/update-repos.sh b/utils/update-repos.sh new file mode 100755 index 0000000..edb85b8 --- /dev/null +++ b/utils/update-repos.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +## If user is not running this in the root of the project dir +if [[ ! -d utils ]]; then + ## Change directory to project dir + cd `dirname $1` + cd .. +fi + + +MESSAGE="${1:?"Message not provided"}" + +git submodule foreach "git add .; git commit -m '$MESSAGE'; git push" + +git add . +git commit -m "$MESSAGE" +git push origin master +git push gitserver master