summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsteban Carnevale <alfplayer@mailoo.org>2014-12-27 13:33:29 -0300
committerEsteban Carnevale <alfplayer@mailoo.org>2014-12-27 13:33:29 -0300
commit8fc440b70731d73b4e9318cc5d5af3b5c22c1bc7 (patch)
tree5a28abd116a8ccb7635e8d210421352e165e2762
parent57a82d1c4a905877b65a6b27472ff47d942e938e (diff)
paraboladocs: Separate commit messages for wikipage addition and deletion.
-rw-r--r--paraboladocs8
1 files changed, 7 insertions, 1 deletions
diff --git a/paraboladocs b/paraboladocs
index 3ee0b8d..617ef8e 100644
--- a/paraboladocs
+++ b/paraboladocs
@@ -92,6 +92,12 @@ _get() {
url="https://wiki.archlinux.org"
fi
+ if [[ -e $title ]] ; then
+ msg="update"
+ else
+ msg="add"
+ fi
+
git checkout "$branch" || \
die2 "git checkout \"$branch\" failed" || return 1
curl -s "$url/index.php?title=$title&action=raw" > "$title" || \
@@ -100,7 +106,7 @@ _get() {
die2 "$wiki page is empty" || return 1
git add "$title" || \
die2 "$wiki git add failed" || return 1
- git commit -m "$title: add" || \
+ git commit -m "$title: $msg" || \
die2 "$wiki git commit failed" || return 1
}