You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2019/11/10 06:50:38 UTC

[kudu] branch branch-1.10.x updated: [build-support] fix on enable_devtoolset_inner.sh

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch branch-1.10.x
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/branch-1.10.x by this push:
     new e437f5a  [build-support] fix on enable_devtoolset_inner.sh
e437f5a is described below

commit e437f5add4d4e669e5b16dcdff7e92b7adf66b56
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Wed Oct 30 18:16:50 2019 -0700

    [build-support] fix on enable_devtoolset_inner.sh
    
    When ccache is not present on the build machine, the prior version
    of this script output an error:
      enable_devtoolset_inner.sh: line 28: [: too many arguments
    
    This patch fixes this minor issue.
    
    Change-Id: I49b1db9933371304674b148cc4d71c3703be1772
    Reviewed-on: http://gerrit.cloudera.org:8080/14595
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    (cherry picked from commit 719418a60235a5155efe95c37e9fc6e319f41e0c)
    Reviewed-on: http://gerrit.cloudera.org:8080/14682
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Tested-by: Alexey Serbin <as...@cloudera.com>
---
 build-support/enable_devtoolset_inner.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-support/enable_devtoolset_inner.sh b/build-support/enable_devtoolset_inner.sh
index c597f1f..5866ab2 100755
--- a/build-support/enable_devtoolset_inner.sh
+++ b/build-support/enable_devtoolset_inner.sh
@@ -25,7 +25,7 @@ set -e
 
 # If ccache was on the PATH and CC/CXX have not already been set, set them to
 # devtoolset-3 specific ccache helper scripts (thus enabling ccache).
-if [ $(which ccache 2> /dev/null) -a ! "$CC" -a ! "$CXX" ]; then
+if which ccache > /dev/null 2>&1 && [ -a ! "$CC" -a ! "$CXX" ]; then
   ROOT=$(cd $(dirname "$BASH_SOURCE") ; pwd)
   export CC="$ROOT/ccache-devtoolset-3/cc"
   export CXX="$ROOT/ccache-devtoolset-3/c++"