chiark / gitweb /
Remove useless use of cat causing pipefail problems
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Mar 2010 11:54:37 +0000 (11:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Mar 2010 11:54:37 +0000 (11:54 +0000)
stump/etc/modack.approved.INO

index 17f9717..cdc3d1c 100755 (executable)
@@ -3,10 +3,16 @@
 set -e
 set -o pipefail
 
+if [ $# != 1 ]; then
+       echo >&2 "wrong # args to $0: $*"
+       exit 1
+fi
+input="$1"
+
 (
-  cat $@ | formail -rt -I "Reply-To: $NOACK" \
-        -I "X-Webstump-Event: approve" \
-       $MAILOUT_ACCEPTACK_FORMAIL_ARGS
+  formail <"$input" -rt -I "Reply-To: $NOACK"  \
+               -I "X-Webstump-Event: approve"  \
+               $MAILOUT_ACCEPTACK_FORMAIL_ARGS
   cat <<_EOB_
 Hello,