From: Silvio Rhatto Date: Sat, 3 Jun 2017 06:07:23 +0000 (-0300) Subject: Updates utils-git X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=989760735fb75847f133e16af4507589f21dbc8a;p=utils-git.git Updates utils-git --- diff --git a/commit-updates b/commit-updates index 7bd360a..93faf12 100755 --- a/commit-updates +++ b/commit-updates @@ -8,10 +8,10 @@ PROJECT="$1" # Check if param is a project if [ ! -z "$PROJECT" ] && [ -z "$2" ] && ( cd $PROJECT &> /dev/null ); then - if ! git status 2> /dev/null; then + if ! git status &> /dev/null; then cd $PROJECT &> /dev/null shift - elif git status $PROJECT | grep -q "$PROJECT (new commits)"; then + elif ! git status $PROJECT | grep -q "$PROJECT (new commits)"; then cd $PROJECT &> /dev/null shift fi