From: Silvio Rhatto Date: Thu, 18 Jun 2015 21:30:23 +0000 (-0300) Subject: Updates X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=bbf8ae7325ededac4c2f1d611be5769ad14fa2bc;p=utils-git.git Updates --- 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