File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - main
77 schedule :
8- - cron : ' 0 0 1 * *'
8+ - cron : ' 0 0 1 * *' # chạy đầu tháng
99 workflow_dispatch :
1010
1111jobs :
@@ -22,11 +22,11 @@ jobs:
2222 rm -f Packages Packages.gz scan.log
2323
2424 # 1. Lọc bỏ .deb bị hỏng (dpkg-deb không đọc được control)
25- for f in *.deb; do
25+ find . -type f -name " *.deb" -print0 | while IFS= read -r -d '' f ; do
2626 echo "Checking $f ..."
2727 if ! dpkg-deb -I "$f" >/dev/null 2>&1; then
2828 echo "❌ Error in $f → removing"
29- rm -rf "$f"
29+ rm -f "$f"
3030 else
3131 echo "✅ OK: $f"
3232 fi
3636 until dpkg-scanpackages -m . /dev/null > Packages 2> scan.log; do
3737 echo "⚠️ dpkg-scanpackages failed, removing broken .deb ..."
3838 grep '\.deb' scan.log | while read -r line; do
39- BAD_DEB=$(echo "$line" | grep -o '[^ ]* \.deb' || true)
39+ BAD_DEB=$(echo "$line" | grep -oE '[^ ]+ \.deb' || true)
4040 if [ -n "$BAD_DEB" ]; then
4141 echo "❌ Removing invalid package: $BAD_DEB"
4242 rm -f "$BAD_DEB"
You can’t perform that action at this time.
0 commit comments