Fix some Bash issues

This commit is contained in:
Robin Richtsfeld 2017-12-06 21:33:21 +01:00
parent 6e0c6adfe9
commit db87cffc17
4 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,7 @@ fi
# Print info # Print info
echo "TF_BUILD_INFO = {"\ echo "TF_BUILD_INFO = {"\
"container_type: \"${CONTAINER_TYPE}\", "\ "container_type: \"${CONTAINER_TYPE}\", "\
"command: \"${COMMAND[@]}\", "\ "command: \"${COMMAND[*]}\", "\
"source_HEAD: \"${TF_HEAD}\", "\ "source_HEAD: \"${TF_HEAD}\", "\
"source_remote_origin: \"${TF_FETCH_URL}\", "\ "source_remote_origin: \"${TF_FETCH_URL}\", "\
"OS: \"${OS}\", "\ "OS: \"${OS}\", "\

View File

@ -82,11 +82,11 @@ TF_CFLAGS=( $("${PYTHON_BIN_PATH}" \
TF_LFLAGS=( $("${PYTHON_BIN_PATH}" \ TF_LFLAGS=( $("${PYTHON_BIN_PATH}" \
-c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') ) -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') )
if [[ -z "${TF_CFLAGS}" || -z "${TF_LFLAGS}" ]]; then if [[ -z "${TF_CFLAGS[*]}" || -z "${TF_LFLAGS[*]}" ]]; then
die "FAILED to determine TensorFlow compilation or linking flags" die "FAILED to determine TensorFlow compilation or linking flags"
else else
echo "TensorFlow compile flags: ${TF_CFLAGS[@]}" echo "TensorFlow compile flags: ${TF_CFLAGS[*]}"
echo "TensorFlow link flags: ${TF_LFLAGS[@]}" echo "TensorFlow link flags: ${TF_LFLAGS[*]}"
fi fi
# Check g++ availability # Check g++ availability

View File

@ -45,7 +45,7 @@ for i in `seq 0 $((TF_GPU_COUNT-1))`; do
# This export only works within the brackets, so it is isolated to one # This export only works within the brackets, so it is isolated to one
# single command. # single command.
export CUDA_VISIBLE_DEVICES=$i export CUDA_VISIBLE_DEVICES=$i
echo "Running test $@ on GPU $CUDA_VISIBLE_DEVICES" echo "Running test $* on GPU $CUDA_VISIBLE_DEVICES"
$@ $@
) )
return_code=$? return_code=$?

View File

@ -124,7 +124,7 @@ function build_tf_image {
function publish_tf_image { function publish_tf_image {
$gcr_tf_image="gcr.io/tensorflow/${tf_image}" gcr_tf_image="gcr.io/tensorflow/${tf_image}"
docker tag $tf_image $gcr_tf_image docker tag $tf_image $gcr_tf_image
gcloud docker -- push $gcr_tf_image gcloud docker -- push $gcr_tf_image
} }