[Pkg-mailman-hackers] Pkg-mailman commit - rev 346 - trunk/debian

Matej Vela vela at costa.debian.org
Thu Aug 24 13:13:07 UTC 2006


Author: vela
Date: 2006-08-24 13:13:06 +0000 (Thu, 24 Aug 2006)
New Revision: 346

Modified:
   trunk/debian/mailman.init
   trunk/debian/postinst
   trunk/debian/rules
Log:
Trivial shell optimizations.

Modified: trunk/debian/mailman.init
===================================================================
--- trunk/debian/mailman.init	2006-08-24 13:00:37 UTC (rev 345)
+++ trunk/debian/mailman.init	2006-08-24 13:13:06 UTC (rev 346)
@@ -39,7 +39,7 @@
 
 case "$1" in
   start)
-    if [ "$(/var/lib/mailman/bin/list_lists -b | grep ^mailman$ )" = "" ]; then
+    if /var/lib/mailman/bin/list_lists -b | fgrep -qx mailman; then
         log_warning_msg "Site list for mailman (usually named mailman) missing."
         log_warning_msg "Please create it; until then, mailman will refuse to start."
         exit 0;

Modified: trunk/debian/postinst
===================================================================
--- trunk/debian/postinst	2006-08-24 13:00:37 UTC (rev 345)
+++ trunk/debian/postinst	2006-08-24 13:13:06 UTC (rev 346)
@@ -46,7 +46,7 @@
 
     # At present ALL directories in /etc/mailman are language directories
     # but this may change in the future, better check.
-    for dir in $(find ${mm_etc} -maxdepth 1 -mindepth 1 -type d | sed -e "s;^${mm_etc}/;;g"); do
+    for dir in $(find ${mm_etc} -maxdepth 1 -mindepth 1 -type d -printf '%P\n'); do
       if [ -f ${mm_dist}/${dir}/options.html ]; then
         old_languages="${old_languages} ${dir}"
       fi
@@ -68,7 +68,7 @@
           #      and md5sum from coreutils (in etch and onwards).
           #      It breaks with md5sum-from-dpkg if a filename ends with ":",
           #      but this is not expected to happen.
-          for file in $(${md5sum} -c ${md5sums} 2>&1 | egrep "OK$" | sed -e 's/:\? *OK$//'); do 
+          for file in $(${md5sum} -c ${md5sums} 2>&1 | sed -n 's/:\? *OK$//p'); do 
             ucf --debconf-ok --purge ${file}
             rm -f ${file} ${file}.dpkg-dist
             echo -n . >&2

Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2006-08-24 13:00:37 UTC (rev 345)
+++ trunk/debian/rules	2006-08-24 13:13:06 UTC (rev 346)
@@ -160,7 +160,7 @@
 	mv `find debian/mailman/etc/mailman -mindepth 1 -maxdepth 1 -type d` debian/mailman/usr/share/mailman
 	cp build/contrib/qmail-to-mailman.py debian/mailman/usr/share/mailman
 
-	find debian/mailman/usr/share/mailman -type f | sed 's,debian/mailman/usr/share/mailman,/etc/mailman,' > debian/ucffiles
+	find debian/mailman/usr/share/mailman -type f -printf '/etc/mailman/%P\n' > debian/ucffiles
 
 	dh_link etc/mailman/qmail-to-mailman.py usr/lib/mailman/bin/qmail-to-mailman.py
 




More information about the Pkg-mailman-hackers mailing list