This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch test_email
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/test_email by this push:
new 4d31d1e97b2 test email (#43662)
4d31d1e97b2 is described below
commit 4d31d1e97b274e1fb824914172dcba9da6c2dfde
Author: HappenLee <[email protected]>
AuthorDate: Tue Nov 12 11:56:26 2024 +0800
test email (#43662)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
dispose.sh | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/dispose.sh b/dispose.sh
new file mode 100644
index 00000000000..68bcaceef23
--- /dev/null
+++ b/dispose.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# 指定要遍历的文件目录
+file=$1
+
+# 遍历 .h 和 .cpp 文件
+# 检查是否已经包含 compile_check_begin.h
+if grep -q '#include "common/compile_check_begin.h"' "$file"; then
+ echo "Skipping $file: already contains compile_check_begin.h."
+ continue
+fi
+
+# 检查是否已经包含 compile_check_end.h (仅在 .h 文件中)
+if [[ "$file" == *.h ]] && grep -q '#include "common/compile_check_end.h"'
"$file"; then
+ echo "Skipping $file: already contains compile_check_end.h."
+ continue
+fi
+
+# 查找第一个 namespace 的行号
+namespace_line=$(grep -n '^namespace' "$file" | head -n 1 | cut -d: -f1)
+
+if [ -z "$namespace_line" ]; then
+ echo "Skipping $file: no namespace found."
+ continue
+fi
+
+# 在第一个 namespace 下插入 compile_check_begin.h
+sed -i "${namespace_line}a #include \"common/compile_check_begin.h\"" "$file"
+
+# 如果是 .h 文件,在文件末尾插入 compile_check_end.h
+if [[ "$file" == *.h ]]; then
+ # 在末尾插入时确保前面有一个换行
+ echo -e "\n#include \"common/compile_check_end.h\"" >> "$file"
+fi
+
+echo "Processed $file."
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]