]> diplodocus.org Git - nmh/blobdiff - uip/mhmail
The buildbot is up, put in hacks to enable debug and print out hostname.
[nmh] / uip / mhmail
index afe633f842c9edaf92d69ce480ca5eac8a4a3905..839b82a70d627baaffbbafe725774a9c946bb41d 100755 (executable)
@@ -160,7 +160,8 @@ for arg in "$@"; do
          #### It's not strictly necessary to have one space after
          #### the : that separates the header field name from the
          #### body, but do it to avoid surprising someone.
          #### It's not strictly necessary to have one space after
          #### the : that separates the header field name from the
          #### body, but do it to avoid surprising someone.
-         add=`printf %s "$arg" | sed -e 's/:/: /' -e 's/:  /: /'`
+         #### Solaris sed wants the trailing newline in its input.
+         add=`printf '%s\n' "$arg" | sed -e 's/:/: /' -e 's/:  /: /'`
          headerfieldlist="${headerfieldlist:+$headerfieldlist}$add
 "
          headerfieldarg=0
          headerfieldlist="${headerfieldlist:+$headerfieldlist}$add
 "
          headerfieldarg=0
@@ -210,7 +211,7 @@ fi
 umask 077
 tmpdir="${MHTMPDIR:-${TMPDIR:-${TMP:-`$nmhbindir/mhpath +`}}}"
 tmpfile="$tmpdir/mhmail$$"
 umask 077
 tmpdir="${MHTMPDIR:-${TMPDIR:-${TMP:-`$nmhbindir/mhpath +`}}}"
 tmpfile="$tmpdir/mhmail$$"
-tmpfilebackup="$tmpdir/[,#]mhmail$$"
+tmpfilebackup="'$tmpdir'/,mhmail$$ '$tmpdir'/#mhmail$$"
 tmpfileresent=
 
 message_file=
 tmpfileresent=
 
 message_file=
@@ -235,7 +236,7 @@ else
   fi
 fi
 
   fi
 fi
 
-trap 'rm -f '"$tmpfile"' '"$tmpfilebackup"' '"$tmpfileresent" EXIT
+trap "rm -f '$tmpfile' $tmpfilebackup ${tmpfileresent:+'$tmpfileresent'}" 0
 
 if [ "$body"x = x ]; then
   #### First put message header in the file.
 
 if [ "$body"x = x ]; then
   #### First put message header in the file.