hgeditor: hide checksum mismatch message from md5sum
authormpm@selenic.com
Sat, 23 Jul 2005 10:08:40 -0500
changeset 769 0c033ef053ab8478bc94f039d71a2e4bb755b126
parent 768 20e95c245bc304f6069e9bb7539f5f3c87b39a75
child 770 b3820ce0e88ab83286fbe838162d1777c63b7b00
push id1
push usergszorc@mozilla.com
push dateWed, 18 Mar 2015 16:34:57 +0000
hgeditor: hide checksum mismatch message from md5sum
hgeditor
--- a/hgeditor
+++ b/hgeditor
@@ -37,17 +37,17 @@ echo > "$T1"
 if [ "$SIGN" == "1" ]; then
     MANIFEST=`grep '^HG: manifest hash' "$1" | cut -b 19-`
     echo -e "\nmanifest hash: $MANIFEST" >> "$T1"
 fi
 grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1"
 
 CHECKSUM=`md5sum "$T1"`
 $EDITOR "$T1" "$T2" || cleanup_exit $?
-echo "$CHECKSUM" | md5sum -c 2>/dev/null && cleanup_exit 13
+echo "$CHECKSUM" | md5sum -c >/dev/null 2>&1 && cleanup_exit 13
 
 if [ "$SIGN" == "1" ]; then
     {
         head -n 1 "$T1"
         echo
         grep -v "^HG:" "$T1" | gpg -t -a -u "${HGUSER}" --clearsign
     } > "$T2" && mv "$T2" "$1"
 else