Author: glen                         Date: Tue Aug 22 19:22:37 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- script to check ownership of perl (perl-dirs) and pear dirs (php-pear)

---- Files affected:
SPECS:
   rpmdb-checkdir.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/rpmdb-checkdir.sh
diff -u /dev/null SPECS/rpmdb-checkdir.sh:1.1
--- /dev/null   Tue Aug 22 21:22:37 2006
+++ SPECS/rpmdb-checkdir.sh     Tue Aug 22 21:22:32 2006
@@ -0,0 +1,18 @@
+#!/bin/sh
+find $(pwd) -type d | while read dir; do
+       whose=$(rpm -qf "$dir")
+       count=$(echo "$whose" | wc -l)
+       case $count in
+       0) # bad
+               echo >&2 "Not owned: $dir"
+               ;;
+       1) # extra check
+               if [[ "$whose" = *is*not* ]]; then
+                       echo >&2 "Disowned: $dir $whose"
+               fi
+               ;;
+       *) # hehe
+               echo >&2 "Duplicate: $dir" $whose
+       esac
+
+done
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to