[Debian-tex-commits] SVN lmodern commit + diffs: r2933 - lmodern/trunk/debian

Florent Rougon frn at alioth.debian.org
Fri Jun 1 19:31:22 UTC 2007


Author: frn
Date: 2007-06-01 19:31:21 +0000 (Fri, 01 Jun 2007)
New Revision: 2933

Modified:
   lmodern/trunk/debian/lmodern.preinst
Log:
Simplify dpkg_md5sum() with 'grep -F', thanks to Julian's suggestion.


Modified: lmodern/trunk/debian/lmodern.preinst
===================================================================
--- lmodern/trunk/debian/lmodern.preinst	2007-06-01 19:21:36 UTC (rev 2932)
+++ lmodern/trunk/debian/lmodern.preinst	2007-06-01 19:31:21 UTC (rev 2933)
@@ -100,18 +100,10 @@
     package="$1"
     conffile="$2"
 
-    found=0
+    sum=$(dpkg-query -W -f='${Conffiles}' "$package" \
+            | grep -F " $conffile " | cut -d ' ' -f 3)
 
-    dpkg-query -W -f='${Conffiles}' "$package" \
-      | while read file sum; do
-            if [ "$file" = "$conffile" ]; then
-                echo "$sum"
-                found=1
-                break
-            fi
-        done
-
-    if [ $found -eq 1 ]; then
+    if [ -n "$sum" ]; then
         res=0
     else
         echo "Conffile '$conffile' not found in package '$package'" >&2




More information about the Debian-tex-commits mailing list