From 2f97f6aadce66027b04e8de1e1ba744b125dcbb9 Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Sun, 13 Mar 2016 13:09:29 +0800 Subject: [PATCH] Avoiding hard-coded bash path Changed '#!/bin/bash' to '#!/usr/bin/env bash'. There do not exist bash in most Unix system, like bsd family. --- configure | 2 +- tensorflow/tools/ci_build/ci_parameterized_build.sh | 2 +- tensorflow/tools/docker/docker_run_gpu.sh | 2 +- tensorflow/tools/docker/run_jupyter.sh | 2 +- tensorflow/tools/docs/gen_docs.sh | 2 +- tensorflow/tools/docs/gen_docs_test.sh | 4 +++- tensorflow/tools/pip_package/build_pip_package.sh | 2 +- tensorflow/tools/swig/swig.sh | 2 +- third_party/gpus/cuda/cuda_config.sh | 2 +- util/python/python_config.sh | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 2d7ec77aec2..0faf61c67b1 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Set up python-related environment settings while true; do diff --git a/tensorflow/tools/ci_build/ci_parameterized_build.sh b/tensorflow/tools/ci_build/ci_parameterized_build.sh index 46c1740af61..9b7e5abd621 100755 --- a/tensorflow/tools/ci_build/ci_parameterized_build.sh +++ b/tensorflow/tools/ci_build/ci_parameterized_build.sh @@ -306,7 +306,7 @@ if [[ "${DO_DOCKER}" == "1" ]]; then fi # Write to the tmp script -echo "#!/bin/bash" > ${TMP_SCRIPT} +echo "#!/usr/bin/env bash" > ${TMP_SCRIPT} if [[ ! -z "${TF_BUILD_BAZEL_CLEAN}" ]] && [[ "${TF_BUILD_BAZEL_CLEAN}" != "0" ]]; then echo ${BAZEL_CLEAN_CMD} >> ${TMP_SCRIPT} diff --git a/tensorflow/tools/docker/docker_run_gpu.sh b/tensorflow/tools/docker/docker_run_gpu.sh index 9ebfa701e4c..ead05f9150f 100755 --- a/tensorflow/tools/docker/docker_run_gpu.sh +++ b/tensorflow/tools/docker/docker_run_gpu.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tensorflow/tools/docker/run_jupyter.sh b/tensorflow/tools/docker/run_jupyter.sh index ba2f3a33262..eb69d62c073 100755 --- a/tensorflow/tools/docker/run_jupyter.sh +++ b/tensorflow/tools/docker/run_jupyter.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tensorflow/tools/docs/gen_docs.sh b/tensorflow/tools/docs/gen_docs.sh index 95c0092d4ac..de507fcd000 100755 --- a/tensorflow/tools/docs/gen_docs.sh +++ b/tensorflow/tools/docs/gen_docs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tensorflow/tools/docs/gen_docs_test.sh b/tensorflow/tools/docs/gen_docs_test.sh index 2f905c8e47f..9375784dc23 100755 --- a/tensorflow/tools/docs/gen_docs_test.sh +++ b/tensorflow/tools/docs/gen_docs_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash -eux +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +14,8 @@ # limitations under the License. # ============================================================================== +set -eux + TFDIR=$TEST_SRCDIR/tensorflow DOXYGEN=doxygen DOXYGEN_CONFIG="tf-doxy_for_md-config" diff --git a/tensorflow/tools/pip_package/build_pip_package.sh b/tensorflow/tools/pip_package/build_pip_package.sh index 6b4e50490bb..1ae6926b676 100755 --- a/tensorflow/tools/pip_package/build_pip_package.sh +++ b/tensorflow/tools/pip_package/build_pip_package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tensorflow/tools/swig/swig.sh b/tensorflow/tools/swig/swig.sh index 0601703b011..c35b2ee3634 100755 --- a/tensorflow/tools/swig/swig.sh +++ b/tensorflow/tools/swig/swig.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/third_party/gpus/cuda/cuda_config.sh b/third_party/gpus/cuda/cuda_config.sh index 42cd254644b..651e5ae0317 100755 --- a/third_party/gpus/cuda/cuda_config.sh +++ b/third_party/gpus/cuda/cuda_config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/util/python/python_config.sh b/util/python/python_config.sh index a5666c2f7ee..83e38566906 100755 --- a/util/python/python_config.sh +++ b/util/python/python_config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License");