diff --git a/apollo6.sh b/apollo6.sh index 4a5bedce32076fdc2f97a5200513bf9f9d2628ae..f70673823f73fa58958ecc4c47f457ba09441368 100755 --- a/apollo6.sh +++ b/apollo6.sh @@ -108,6 +108,9 @@ function main() { doc) ${APOLLO_ROOT_DIR}/scripts/apollo_docs.sh "$@" ;; + configurator) # Consult Kecheng Xu + ${APOLLO_ROOT_DIR}/scripts/configurator.sh "$@" + ;; usage) _usage ;; diff --git a/scripts/apollo_buildify.sh b/scripts/apollo_buildify.sh index d58ae5e65a686ae04a111172e6d4576a2ee05eae..37a98c44c747328587d305a59771ba1d0a35eea5 100755 --- a/scripts/apollo_buildify.sh +++ b/scripts/apollo_buildify.sh @@ -2,8 +2,8 @@ set -e -TOPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" -source "${TOPDIR}/scripts/apollo.bashrc" +TOP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +source "${TOP_DIR}/scripts/apollo.bashrc" function buildify() { local stage="${1:-dev}" diff --git a/scripts/apollo_clean.sh b/scripts/apollo_clean.sh index 0248208e46e7baa10fd7f0343adb9b7f8ab74a6d..331759dc03a83b2113093c05fa3a5629e573c49d 100755 --- a/scripts/apollo_clean.sh +++ b/scripts/apollo_clean.sh @@ -1,8 +1,8 @@ #! /usr/bin/env bash set -e -TOPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" -source "${TOPDIR}/scripts/apollo.bashrc" +TOP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +source "${TOP_DIR}/scripts/apollo.bashrc" function clean() { local stage="$1"; shift @@ -13,7 +13,7 @@ function clean() { fi bazel clean --async - docs_sh="${TOPDIR}/scripts/apollo_docs.sh" + docs_sh="${TOP_DIR}/scripts/apollo_docs.sh" if [ -f "${docs_sh}" ]; then bash "${docs_sh}" clean "${stage}" fi diff --git a/scripts/apollo_docs.sh b/scripts/apollo_docs.sh index ef038255a2abbd90b77532470ec3eab88c7fbc5d..f31524afe5fd089cacfc95143a2979438a028873 100755 --- a/scripts/apollo_docs.sh +++ b/scripts/apollo_docs.sh @@ -1,8 +1,8 @@ #! /usr/bin/env bash set -e -TOPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" -source "${TOPDIR}/scripts/apollo.bashrc" +TOP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +source "${TOP_DIR}/scripts/apollo.bashrc" APOLLO_DOCS_CFG="${APOLLO_ROOT_DIR}/apollo.doxygen" APOLLO_DOCS_DIR="${APOLLO_ROOT_DIR}/.cache/docs" diff --git a/scripts/apollo_lint.sh b/scripts/apollo_lint.sh index 2a42b19fef37b73a8c87e020df778153af6d0b50..efcac3fe3c7dd413c6d73f4e60bef1bbc96cec15 100755 --- a/scripts/apollo_lint.sh +++ b/scripts/apollo_lint.sh @@ -1,8 +1,8 @@ #! /usr/bin/env bash set -e -TOPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" -source "${TOPDIR}/scripts/apollo.bashrc" +TOP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +source "${TOP_DIR}/scripts/apollo.bashrc" function cpp_lint() { info "running cpp_lint ..." diff --git a/scripts/configurator.sh b/scripts/configurator.sh index a2ba3ec098e69e7999e81f8e925197a377b26481..b10d82666ea157feb4427ab79e06ea01286201a7 100755 --- a/scripts/configurator.sh +++ b/scripts/configurator.sh @@ -16,11 +16,9 @@ # limitations under the License. ############################################################################### +set -e -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +TOP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +source "${TOP_DIR}/scripts/apollo.bashrc" -cd "${DIR}/.." - -source "${DIR}/apollo_base.sh" - -python modules/tools/configurator/configurator.py +python3 "${TOP_DIR}/modules/tools/configurator/configurator.py" diff --git a/what_works.sh b/what_works.sh index 50582dc64742e0c38e894565ed0786a6a4204e3e..ad17dc266fc96b880662ff3ed10ce18ac0d5f92e 100755 --- a/what_works.sh +++ b/what_works.sh @@ -159,6 +159,7 @@ echo "########################### All check passed! ###########################" # See https://pypi.org/project/pycodestyle/ # TODO(?): Use py_library, py_binary, py_test to manage python code: # See https://docs.bazel.build/versions/master/be/python.html +# TODO(Kecheng Xu): modules/tools/configurator/configurator.py: 2to3 # TODO(storypku): cyber.aarch64 docker image # TODO(storypku): tools/workspace.bzl to re-org WORKSPACE.in # TODO(?): no break for cpu only build