[projects/pld-ftp-admin] Streamline and simplify clean-test script
baggins
baggins at pld-linux.org
Sun Feb 8 11:31:38 CET 2026
commit 2e7f7a61fdc5f5ee1275c94299ce0a3de21b4cd4
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Feb 8 11:29:13 2026 +0100
Streamline and simplify clean-test script
wwwbin/clean-test.sh | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/wwwbin/clean-test.sh b/wwwbin/clean-test.sh
index 475f84f..7a8c233 100755
--- a/wwwbin/clean-test.sh
+++ b/wwwbin/clean-test.sh
@@ -1,16 +1,18 @@
#!/bin/sh
+
LC_ALL=C; export LC_ALL
cd /home/pld/admins/th/ftp/test/SRPMS/.metadata || exit 1
-#for file in `find . -name '*.info' -print`; do
-for file in `find . -name '*.info' -mtime +1 -print`; do
- dfile=$(basename $file | sed -e 's#^\./##g')
- if (~/pld-ftp-admin/scripts/test-move.py test ready "$dfile" | grep -q "has only src.rpm built"); then
- echo "Removing $dfile..."
- ~/pld-ftp-admin/scripts/remove.py test "$dfile"
- fi
-done
-for file in `find . -name '*.info' -mtime +100`; do
- dfile=$(basename $file | sed -e 's#^\./##g')
- echo "Removing $dfile..."
- ~/pld-ftp-admin/scripts/remove.py test "$dfile"
-done
+
+# find . -name '*.info' -print
+
+NOT_BUILD=$(find . -name '*.info' -mtime +1 -printf '%P\0' | xargs -0 ~/pld-ftp-admin/scripts/test-move.py test ready | awk '/has only src.rpm built/ { print $2 }')
+if [ -n "$NOT_BUILD" ]; then
+ echo "Removing $NOT_BUILD"
+ ~/pld-ftp-admin/scripts/remove.py test $NOT_BUILD
+fi
+
+TOO_OLD=$(find . -name '*.info' -mtime +100 -printf '%P\n')
+if [ -n "$TOO_OLD" ]; then
+ echo "Removing $TOO_OLD"
+ ~/pld-ftp-admin/scripts/remove.py test $TOO_OLD
+fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/2e7f7a61fdc5f5ee1275c94299ce0a3de21b4cd4
More information about the pld-cvs-commit
mailing list