diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-09-23 13:57:28 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-09-23 13:57:28 +0000 |
commit | d282d825f107e546cb920173763890106430be99 (patch) | |
tree | 102bf295dcc0842adcbffecb3cadcb1f50bb1d4b /eclass/git-2.eclass | |
parent | Drop -n & -z test operators -- they're redundant in [[ ]]. (diff) | |
download | gentoo-2-d282d825f107e546cb920173763890106430be99.tar.gz gentoo-2-d282d825f107e546cb920173763890106430be99.tar.bz2 gentoo-2-d282d825f107e546cb920173763890106430be99.zip |
Replace redundant $? checks with explicit if..fi.
Diffstat (limited to 'eclass/git-2.eclass')
-rw-r--r-- | eclass/git-2.eclass | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass index 687e1eba0c71..5bf85275cc96 100644 --- a/eclass/git-2.eclass +++ b/eclass/git-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.17 2011/09/23 13:57:15 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.18 2011/09/23 13:57:28 mgorny Exp $ # @ECLASS: git-2.eclass # @MAINTAINER: @@ -290,8 +290,7 @@ git-2_initial_clone() { EGIT_REPO_URI_SELECTED="" for repo_uri in ${EGIT_REPO_URI}; do debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\"" - git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}" - if [[ $? -eq 0 ]]; then + if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then # global variable containing the repo_name we will be using debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" EGIT_REPO_URI_SELECTED="${repo_uri}" @@ -326,8 +325,7 @@ git-2_update_repo() { git config remote.origin.url "${repo_uri}" debug-print "${EGIT_UPDATE_CMD}" - ${EGIT_UPDATE_CMD} > /dev/null - if [[ $? -eq 0 ]]; then + if ${EGIT_UPDATE_CMD} > /dev/null; then # global variable containing the repo_name we will be using debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" EGIT_REPO_URI_SELECTED="${repo_uri}" |