提交 b3a4fdd1 编写于 作者: S storypku 提交者: Chang Songhong

Scripts: improved "apollo.sh clean".

Added "bash apollo.sh clean --help" for usage
上级 18d48baf
......@@ -124,7 +124,7 @@ function _usage() {
${BLUE}doc${NO_COLOR}: generate doxygen document
${BLUE}clean${NO_COLOR}: cleanup bazel output and log/coredump files
${BLUE}format${NO_COLOR}: format C++/Python/Bazel/Shell files
${BLUE}usage${NO_COLOR}: show this message
${BLUE}usage${NO_COLOR}: show this message and exit
"
}
......@@ -199,7 +199,7 @@ function main() {
env ${APOLLO_ENV} bash "${APOLLO_ROOT_DIR}/scripts/apollo_lint.sh" cpp
;;
clean)
env ${APOLLO_ENV} bash "${APOLLO_ROOT_DIR}/scripts/apollo_clean.sh" "-a"
env ${APOLLO_ENV} bash "${APOLLO_ROOT_DIR}/scripts/apollo_clean.sh" "$@"
;;
doc)
env ${APOLLO_ENV} bash "${APOLLO_ROOT_DIR}/scripts/apollo_docs.sh" "$@"
......
......@@ -38,9 +38,9 @@ function _clean_bazel_cache() {
# Remove bazel cache in associated directories
if [ -d /apollo-simulator ]; then
pushd /apollo-simulator > /dev/null
pushd /apollo-simulator >/dev/null
bazel clean ${opt}
popd > /dev/null
popd >/dev/null
fi
}
......@@ -75,11 +75,15 @@ function _print_usage() {
echo "${TAB}--log Remove log files"
echo "${TAB}-a, --all Equivalent to \"--bazel --core --log\""
echo "${TAB}--expunge Run \"bazel clean --expunge\""
echo "${TAB}-h, --help Show this message"
echo "${TAB}-h, --help Show this message and exit"
}
function parse_arguments() {
if [[ $# -eq 0 ]]; then
_print_usage
exit 1
fi
while [ $# -gt 0 ]; do
local opt="$1"
shift
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册