diff options
author | 2017-06-08 18:50:38 +0200 | |
---|---|---|
committer | 2017-06-08 09:50:38 -0700 | |
commit | b0e8814575281247a00a185130148b9a1ffbbc7f (patch) | |
tree | 4dfc635cf2a8a2bbd769da3609808f37078e4573 | |
parent | 284901b08f7b25755e4213ae4f6498d7acf914d1 (diff) |
[Bash] Declare and assign separately (#10509)
As proposed by static analysis tool:
https://github.com/koalaman/shellcheck/wiki/SC2155
-rwxr-xr-x | configure | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -119,7 +119,8 @@ function setup_python { exit 1 fi - local python_major_version=$("${PYTHON_BIN_PATH}" -c 'from __future__ import print_function; import sys; print(sys.version_info[0]);' | head -c1) + local python_major_version + python_major_version=$("${PYTHON_BIN_PATH}" -c 'from __future__ import print_function; import sys; print(sys.version_info[0]);' | head -c1) if [ -z "$python_major_version" ]; then echo -e "\n\nERROR: Problem getting python version. Is $PYTHON_BIN_PATH the correct python binary?" exit 1 @@ -603,7 +604,8 @@ while true; do CUDNN_PATH_FROM_LDCONFIG="$($LDCONFIG_BIN -p | sed -n 's/.*libcudnn.so .* => \(.*\)/\1/p')" if [ -e "${CUDNN_PATH_FROM_LDCONFIG}${TF_CUDNN_EXT}" ]; then export TF_CUDNN_VERSION - export CUDNN_INSTALL_PATH="$(dirname ${CUDNN_PATH_FROM_LDCONFIG})" + export CUDNN_INSTALL_PATH + CUDNN_INSTALL_PATH="$(dirname ${CUDNN_PATH_FROM_LDCONFIG})" write_action_env_to_bazelrc "CUDNN_INSTALL_PATH" "$CUDNN_INSTALL_PATH" break fi |