aboutsummaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-06-22 10:15:07 -0400
committerW. Trevor King <wking@drexel.edu>2009-06-22 10:15:07 -0400
commitfb342df1b66897ab17377d6e923049e292149683 (patch)
tree19a845f4b68dd0391a23685e27c4d0a2684faaf6 /xml
parent22aad60c0372e7a573ee2f9b908c11c96c48468f (diff)
downloadbugseverywhere-fb342df1b66897ab17377d6e923049e292149683.tar.gz
Adjusted catmutt for portability following Mortiz' suggestions.
Diffstat (limited to 'xml')
-rwxr-xr-xxml/catmutt10
1 files changed, 5 insertions, 5 deletions
diff --git a/xml/catmutt b/xml/catmutt
index 246bf39..601f14f 100755
--- a/xml/catmutt
+++ b/xml/catmutt
@@ -43,17 +43,17 @@ trap "rm -f ${TMPFILE}; exit 1" 1 2 3 13 15
cat > "${TMPFILE}" || exit 1
# Now that we've read in the mailbox file, reopen stdin for mutt/user
-# interaction. We're not technically in a tty, so use a little hack
-# from "greno" at
+# interaction. When in a pipe we're not technically in a tty, so use
+# a little hack from "greno" at
# http://www.linuxforums.org/forum/linux-programming-scripting/98607-bash-stdin-problem.html
-tty="/dev/$(ps -p$$ --no-heading | awk '{print $2}')"
+tty="/dev/`ps -p$$ --no-heading | awk '{print $2}'`"
exec < ${tty}
if [ `wc -c "${TMPFILE}" | awk '{print $1}'` -gt 0 ]; then
- echo 1>&2 "Calling mutt on mailbox file (${TMPFILE})."
+ echo 1>&2 "Calling mutt on temporary mailbox file (${TMPFILE})."
mutt -R -f "${TMPFILE}" "$@"
else
echo 1>&2 "Empty mailbox input."
fi
-rm -f "${TMPFILE}" && echo 1>&2 "Deleted results file (${TMPFILE})."
+rm -f "${TMPFILE}" && echo 1>&2 "Deleted temporary mailbox file (${TMPFILE})."