aboutsummaryrefslogtreecommitdiff
path: root/commit-updates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-06-18 18:30:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-06-18 18:30:23 -0300
commitbbf8ae7325ededac4c2f1d611be5769ad14fa2bc (patch)
tree4befcb664ea005e7f67d7da157e53a71809db388 /commit-updates
parent8e4c72bb038a8ce83f64fce5d236badb4f146085 (diff)
downloadutils-git-bbf8ae7325ededac4c2f1d611be5769ad14fa2bc.tar.gz
utils-git-bbf8ae7325ededac4c2f1d611be5769ad14fa2bc.tar.bz2
Updates
Diffstat (limited to 'commit-updates')
-rwxr-xr-xcommit-updates6
1 files changed, 5 insertions, 1 deletions
diff --git a/commit-updates b/commit-updates
index 698af4d..303bee0 100755
--- a/commit-updates
+++ b/commit-updates
@@ -9,7 +9,11 @@ ARGS="$*"
# Simply update commit
if git status &> /dev/null; then
if [ ! -z "$1" ]; then
- commit "Updates $*"
+ if [ -e '.git' ]; then
+ commit "Updates $*"
+ elif [ -d "$1" ]; then
+ ( cd $1 && commit "Updates $(basename $1)" )
+ fi
else
commit "Updates $(basename `pwd`)"
fi