[Lunar-commits] r26923 - lunar/trunk/var/lib/lunar/plugins

Stefan Wold ratler at lunar-linux.org
Mon Nov 26 12:05:05 CET 2007


Author: ratler
Date: 2007-11-26 12:05:05 +0100 (Mon, 26 Nov 2007)
New Revision: 26923

Modified:
   lunar/trunk/var/lib/lunar/plugins/check-md5sum.plugin
Log:
Sorry but file -b was really useful. Added the ability to find header/include files properly too

Modified: lunar/trunk/var/lib/lunar/plugins/check-md5sum.plugin
===================================================================
--- lunar/trunk/var/lib/lunar/plugins/check-md5sum.plugin	2007-11-26 10:41:44 UTC (rev 26922)
+++ lunar/trunk/var/lib/lunar/plugins/check-md5sum.plugin	2007-11-26 11:05:05 UTC (rev 26923)
@@ -33,7 +33,8 @@
             while read LINE ; do
       if ! echo $LINE | md5sum --check --status ; then
         FILE=$(echo $LINE | awk '{ print $2 }')
-        if [ -f "$FILE" ] && [ ! -h "$FILE" ]; then
+        if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" |
+              egrep -q "executable|shared object|current ar archive|ASCII C?? program" ; then
           message "${FILE_COLOR}$FILE${DEFAULT_COLOR} of ${MODULE_COLOR}$MODULE${PROBLEM_COLOR} has wrong md5sum.${DEFAULT_COLOR}"
           MD5SUM_STATUS=1
         fi



More information about the Lunar-commits mailing list