提交 846a3e81 编写于 作者: 李鸿章

check non-empty before rm -rf

上级 6119eefa
...@@ -21,7 +21,7 @@ THIRD_PARTY_DIR=$(realpath "$SCRIPT_BASEDIR/../../third_party") ...@@ -21,7 +21,7 @@ THIRD_PARTY_DIR=$(realpath "$SCRIPT_BASEDIR/../../third_party")
BUILDDIR="$(dirname "$SCRIPT_BASEDIR")/build_securec" BUILDDIR="$(dirname "$SCRIPT_BASEDIR")/build_securec"
build_securec() { build_securec() {
rm -rf "$BUILDDIR" [ -n "$BUILDDIR" ] && rm -rf "$BUILDDIR"
mkdir "$BUILDDIR" mkdir "$BUILDDIR"
cd "$BUILDDIR" || exit cd "$BUILDDIR" || exit
if ! command -v cmake; then if ! command -v cmake; then
...@@ -32,7 +32,7 @@ build_securec() { ...@@ -32,7 +32,7 @@ build_securec() {
} }
clean_securec() { clean_securec() {
rm -rf "$BUILDDIR" [ -n "$BUILDDIR" ] && rm -rf "$BUILDDIR"
} }
build_crc32() { build_crc32() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册