Skip to content

Commit

Permalink
Update 5-check_poc.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
adysec authored Jan 22, 2025
1 parent ea683ee commit 76521bf
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions 5-check_poc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,10 @@ if [ ! -d "$TMP_DIR" ]; then
fi

# 查找 YAML 文件
yaml_files=$(find "$TMP_DIR" -type f \( -name "*.yml" -o -name "*.yaml" \))
if [ -z "$yaml_files" ]; then
echo "未找到 YAML 文件,退出。"
exit 0
fi

# 遍历每个 YAML 文件
for file in $yaml_files; do
find "$TMP_DIR" -type f \( -name "*.yml" -o -name "*.yaml" \) | while IFS= read -r file; do
CURRENT_TIME=$(date +%s)
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))

# 检查是否超时
if [ "$ELAPSED_TIME" -ge "$TIMEOUT" ]; then
echo "运行时间已超过 5 小时 30 分钟,强制退出。"
Expand Down

0 comments on commit 76521bf

Please sign in to comment.