From de3ab6ece9352cf781c75534e95f1efba5e6b58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 1 Nov 2010 23:07:39 +0100 Subject: [PATCH] Avoid using XSI extensions (-a and -o test operators). --- sunrise-commit.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sunrise-commit.in b/sunrise-commit.in index 40b5efd..abb3612 100755 --- a/sunrise-commit.in +++ b/sunrise-commit.in @@ -59,10 +59,11 @@ find_repo() { elif cvs status -l >/dev/null 2>&1; then SC_VCS=cvs else - local remotes + local remotes ret remotes=$(git branch -r 2>/dev/null) + ret=${?} - if [ ${?} -ne 127 -a ${?} -ne 128 ]; then + if [ ${ret} -ne 127 ] && [ ${ret} -ne 128 ]; then if echo "${remotes}" | grep git-svn >/dev/null 2>&1; then SC_VCS=git-svn else @@ -407,7 +408,7 @@ main() { # With DVCS repos, we do not do ChangeLogs by default... # ...at least unless they're already there. - if [ ${SC_VCS#git-} = svn -o ${SC_VCS} = cvs -o -f ChangeLog ]; then + if [ ${SC_VCS#git-} = svn ] || [ ${SC_VCS} = cvs ] || [ -f ChangeLog ]; then sayv 'Cleaning up the ChangeLog...' vcs_reset ChangeLog @@ -449,7 +450,7 @@ main() { fi fi - if [ ${SC_VCS} != cvs -o -n "${noupdate}" ]; then + if [ ${SC_VCS} != cvs ] || [ -n "${noupdate}" ]; then vcs_status fi echo