Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
bf46bb43
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bf46bb43
编写于
8月 20, 2020
作者:
S
storypku
提交者:
Liu Jiaming
8月 20, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Scripts: add -h|--help option for apollo_clean.sh
上级
fa8df254
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
12 deletion
+20
-12
apollo.sh
apollo.sh
+1
-1
scripts/apollo_clean.sh
scripts/apollo_clean.sh
+19
-11
未找到文件。
apollo.sh
浏览文件 @
bf46bb43
...
@@ -121,7 +121,7 @@ function _usage() {
...
@@ -121,7 +121,7 @@ function _usage() {
${
BLUE
}
build_teleop
${
NO_COLOR
}
: run build with teleop enabled.
${
BLUE
}
build_teleop
${
NO_COLOR
}
: run build with teleop enabled.
${
BLUE
}
build_prof [module]
${
NO_COLOR
}
: build with perf profiling support. Not implemented yet.
${
BLUE
}
build_prof [module]
${
NO_COLOR
}
: build with perf profiling support. Not implemented yet.
${
BLUE
}
doc
${
NO_COLOR
}
: generate doxygen document
${
BLUE
}
doc
${
NO_COLOR
}
: generate doxygen document
${
BLUE
}
clean
${
NO_COLOR
}
: cleanup
, including 'bazel clean --async'.
${
BLUE
}
clean
${
NO_COLOR
}
: cleanup
bazel outputs and log/coredump files
${
BLUE
}
usage
${
NO_COLOR
}
: show this message
${
BLUE
}
usage
${
NO_COLOR
}
: show this message
"
"
}
}
...
...
scripts/apollo_clean.sh
浏览文件 @
bf46bb43
...
@@ -26,16 +26,16 @@ LOG_DIR="${TOP_DIR}/data/log"
...
@@ -26,16 +26,16 @@ LOG_DIR="${TOP_DIR}/data/log"
function
_clean_cache
()
{
function
_clean_cache
()
{
local
opt
=
"--async"
local
opt
=
"--async"
if
[
"
$1
"
==
"expunge"
]
;
then
if
[
"
$1
"
==
"
--
expunge"
]
;
then
opt
=
"--expunge_async"
opt
=
"--expunge_async"
fi
fi
bazel clean
"
${
opt
}
"
bazel clean
${
opt
}
# Remove bazel cache in associated directories
# Remove bazel cache in associated directories
if
[
-d
/apollo-simulator
]
;
then
if
[
-d
/apollo-simulator
]
;
then
pushd
/apollo-simulator
>
/dev/null
pushd
/apollo-simulator
>
/dev/null
bazel clean
"
${
opt
}
"
bazel clean
${
opt
}
popd
>
/dev/null
popd
>
/dev/null
fi
fi
}
}
...
@@ -64,9 +64,20 @@ function _clean_docs() {
...
@@ -64,9 +64,20 @@ function _clean_docs() {
fi
fi
}
}
function
clean
()
{
function
_print_usage
()
{
echo
-e
"Usage:
\n
$0
[options]
\n
Options:"
echo
"
${
TAB
}
--expunge Run
\"
bazel clean --expunge
\"
"
echo
"
${
TAB
}
-h, --help Show this message"
}
function
main
()
{
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
_print_usage
exit
1
fi
if
!
"
${
APOLLO_IN_DOCKER
}
"
;
then
if
!
"
${
APOLLO_IN_DOCKER
}
"
;
then
error
"The clean operation
must
be run from within docker container"
error
"The clean operation
should
be run from within docker container"
exit
1
exit
1
fi
fi
...
@@ -76,9 +87,10 @@ function clean() {
...
@@ -76,9 +87,10 @@ function clean() {
local
answer
local
answer
typeset
-l
answer
typeset
-l
answer
warning
"
All the files under
${
LOG_DIR
}
and
${
CORE_DIR
}
will be removed."
warning
"
Do you want to remove all log files under
\"
${
LOG_DIR
}
\"
"
\
warning
"Do you want to continue
(Y/n)?"
"and core dump files under
\"
${
CORE_DIR
}
\"
(Y/n)?"
answer
=
$(
read_one_char_from_stdin
)
answer
=
$(
read_one_char_from_stdin
)
info
"Your choice is:
${
answer
}
"
if
[
"
${
answer
}
"
==
"y"
]
;
then
if
[
"
${
answer
}
"
==
"y"
]
;
then
_clean_core
_clean_core
_clean_log
_clean_log
...
@@ -87,8 +99,4 @@ function clean() {
...
@@ -87,8 +99,4 @@ function clean() {
success
"Apollo cleanup done."
success
"Apollo cleanup done."
}
}
function
main
()
{
clean
"
$@
"
}
main
"
$@
"
main
"
$@
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录