diff options
-rwxr-xr-x | commit-updates | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/commit-updates b/commit-updates index ed3f214..7bd360a 100755 --- a/commit-updates +++ b/commit-updates @@ -8,7 +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 && git status $PROJECT | grep -q "$PROJECT (new commits)"; then + if ! git status 2> /dev/null; then + cd $PROJECT &> /dev/null + shift + elif git status $PROJECT | grep -q "$PROJECT (new commits)"; then cd $PROJECT &> /dev/null shift fi |