Skip to content

Commit d55e9d3

Browse files
committed
scripts: cleanup
* fix some shellcheck
1 parent 00206db commit d55e9d3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

scripts/build_and_run_tests_bazel.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ echo "Building and testing in $PWD using 'python' (version $PYVERSION)."
2121

2222
bazel clean --expunge # Force a deep update
2323

24+
# Can't use BAZEL_CXXOPTS since it will be override by the bazelrc cxxopt need
25+
# to use --cxxopt on the command line instead which will override the bazelrc
26+
# cxxopt config.
2427
bazel test --cxxopt=-std=c++14 ... --test_output=errors "$@" --enable_bzlmod
2528
bazel test --cxxopt=-std=c++17 ... --test_output=errors "$@" --enable_bzlmod
2629
bazel test --cxxopt=-std=c++20 ... --test_output=errors "$@" --enable_bzlmod

scripts/build_and_run_tests_cmake.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ if [[ $is_in_virtual_env == "false" ]]; then
5454
if ! [ -d "$VENV_DIR" ]; then
5555
echo "Installing..."
5656
echo -e "\e[33mInstalling a virtualenv to $VENV_DIR. The setup is long the first time, please wait.\e[0m"
57-
virtualenv -p $PYBIN $VENV_DIR
57+
virtualenv -p "$PYBIN" "$VENV_DIR"
5858
else
5959
echo -e "\e[33mReusing virtualenv from $VENV_DIR.\e[0m"
6060
fi
61-
source $VENV_DIR/bin/activate
61+
source "${VENV_DIR}/bin/activate"
6262
fi
6363

6464
# We only exit the virtualenv if we created one.
@@ -75,8 +75,10 @@ pip3 install --upgrade -r $(python3 -c 'import sys; print("./pybind11_abseil/req
7575

7676
echo "Building and testing in $PWD using 'python' (version $PYVERSION)."
7777

78-
export PYTHON_BIN_PATH=`which python3`
79-
export PYTHON_LIB_PATH=`python3 -c "import sysconfig; print(sysconfig.get_path('include'))"`
78+
PYTHON_BIN_PATH="$(which python3)"
79+
export PYTHON_BIN_PATH
80+
PYTHON_LIB_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))")
81+
export PYTHON_LIB_PATH
8082
echo "Using PYTHON_BIN_PATH: $PYTHON_BIN_PATH"
8183
echo "Using PYTHON_LIB_PATH: $PYTHON_LIB_PATH"
8284

0 commit comments

Comments
 (0)