From 08827d56e10f32e2bbf36146317c75cfb9a5aa37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 26 Aug 2010 00:08:21 +0200 Subject: [PATCH] Simplify checking exit code 0. --- sunrise-commit | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sunrise-commit b/sunrise-commit index 9318b65..36109d7 100755 --- a/sunrise-commit +++ b/sunrise-commit @@ -42,9 +42,7 @@ local_supported || eval 'local() { # See if we're in a repo, and what VCS are we using. find_repo() { - svn info >/dev/null 2>&1 - - if [ ${?} -eq 0 ]; then + if svn info >/dev/null 2>&1; then SC_VCS=svn elif hg tip 2>/dev/null; then SC_VCS=hg @@ -53,8 +51,7 @@ find_repo() { remotes=$(git branch -r 2>/dev/null) if [ ${?} -ne 127 -a ${?} -ne 128 ]; then - echo "${remotes}" | grep git-svn >/dev/null 2>&1 - if [ ${?} -eq 0 ]; then + if echo "${remotes}" | grep git-svn >/dev/null 2>&1; then SC_VCS=git-svn else SC_VCS=git