aboutsummaryrefslogtreecommitdiff
path: root/commit-updates
diff options
context:
space:
mode:
Diffstat (limited to 'commit-updates')
-rwxr-xr-xcommit-updates10
1 files changed, 7 insertions, 3 deletions
diff --git a/commit-updates b/commit-updates
index 571cadd..698af4d 100755
--- a/commit-updates
+++ b/commit-updates
@@ -7,8 +7,12 @@
ARGS="$*"
# Simply update commit
-if [ ! -z "$1" ]; then
- commit "Updates $*"
+if git status &> /dev/null; then
+ if [ ! -z "$1" ]; then
+ commit "Updates $*"
+ else
+ commit "Updates $(basename `pwd`)"
+ fi
else
- commit "Updates $(basename `pwd`)"
+ mr commit -m "Updates"
fi