From 720b0c3def3e6f462d5220cd00bd3c25cad055ed Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 24 Jun 2013 01:56:48 -0400 Subject: [PATCH] feat(update_ebuilds): Add option to immediately commit updates --- update_ebuilds | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/update_ebuilds b/update_ebuilds index f952963d2a..adc4e2af48 100755 --- a/update_ebuilds +++ b/update_ebuilds @@ -13,6 +13,9 @@ DEFINE_string portage_stable "${SRC_ROOT}/third_party/portage-stable" \ "Path to the portage-stable git checkout." DEFINE_string cvsroot ":pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot" \ "CVS location for gentoo-x86 to use when --portage isn't provided." +DEFINE_boolean commit ${FLAGS_FALSE} \ + "Commit all changes after updating portage-stable." + # Parse flags FLAGS "$@" || exit 1 @@ -55,4 +58,19 @@ for pkg in "$@"; do # TODO(marineam): Update metadata directory? done -git status + +if [[ $FLAGS_commit -eq $FLAGS_TRUE ]]; then + if [[ $# -eq 1 ]]; then + git commit -e -m "bump($1): sync with upstream" + else + cat > .git/COMMIT_EDITMSG <