summaryrefslogtreecommitdiff
path: root/packages/git.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2021-05-20 08:40:59 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-21 05:11:05 +0100
commit61aeed196b412ca0c57a8b7a52593215752f1e37 (patch)
treee8dd1e70cebc0e9459e4b316f664d1476ff6997a /packages/git.source.sh
parent39ad6ec3be66ef5c1a9ac99e34a616ebdcf1dab7 (diff)
some log bugfixing, also add another alternate config file path
Diffstat (limited to 'packages/git.source.sh')
-rw-r--r--packages/git.source.sh13
1 files changed, 3 insertions, 10 deletions
diff --git a/packages/git.source.sh b/packages/git.source.sh
index 9ee238cc..ca1f4750 100644
--- a/packages/git.source.sh
+++ b/packages/git.source.sh
@@ -26,20 +26,13 @@ git::commit () {
local -r message="$1"; shift
cd "$content_dir" &>/dev/null
+ set +e
git commit -a -m "$message"
if [[ "$GIT_PUSH" == yes ]]; then
+ log INFO "Invoking git pull/push in $content_dir"
git pull
git push
fi
- cd - &>/dev/null
-}
-
-# Commit all changes
-git::commit () {
- local -r content_dir="$CONTENT_BASE_DIR/$1"; shift
- local -r message="$1"; shift
-
- cd "$content_dir" &>/dev/null
- git commit -a -m "$message"
+ set -e
cd - &>/dev/null
}