rancid (2.3.3-1) 03_diffstat.dpatch

Summary

 bin/control_rancid.in |    3 +++
 1 file changed, 3 insertions(+)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_diffstat.dpatch by Roland Rosenfeld <roland@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: add diffstat output to changes e-mail (Closes: #357218)

@DPATCH@
diff -urNad rancid~/bin/control_rancid.in rancid/bin/control_rancid.in
--- rancid~/bin/control_rancid.in
+++ rancid/bin/control_rancid.in
@@ -475,6 +475,9 @@
 	  echo "Subject: $subject"
 	  echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}'
 	  echo ""
+	  if which diffstat >/dev/null; then
+	      diffstat $TMP.diff
+	  fi
 	  cat $TMP.diff
 	) | sendmail -t
 fi