aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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