diff options
Diffstat (limited to 'recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4')
-rw-r--r-- | recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4 | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4 b/recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4 new file mode 100644 index 0000000000..e5f3d0a061 --- /dev/null +++ b/recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4 @@ -0,0 +1,77 @@ +--- mgetty-1.1.30.old/samples/new_fax.mime4 1999-04-17 06:38:50.000000000 -0400 ++++ mgetty-1.1.30/samples/new_fax.mime4 2003-07-01 23:45:07.000000000 -0400 +@@ -37,13 +37,14 @@ + PATH=/usr/sbin:/usr/local/bin:/usr/bin:/bin:$PATH + + # Select image type by uncommenting one of the following lines: +-#PBMTOX=pnmtopng ; MIME_TYPE="image/png" ; FILE_EXTN=png +-PBMTOX=ppmtogif ; MIME_TYPE="image/gif" ; FILE_EXTN=gif ++PBMTOX=pnmtopng ; MIME_TYPE="image/png" ; FILE_EXTN=png ++#PBMTOX=ppmtogif ; MIME_TYPE="image/gif" ; FILE_EXTN=gif + #PBMTOX=pnmtotiff ; MIME_TYPE="image/tiff" ; FILE_EXTN=tif + # PBM files may be huge + #PBMTOX=cat ; MIME_TYPE="image/x-portable-bitmap" ; FILE_EXTN=pbm + # compressed PBM files + #PBMTOX=gzip ; MIME_TYPE="application/octet-stream"; FILE_EXTN=pbm.gz ++#PBMTOX=NONE ; MIME_TYPE="image/fax-g3"; FILE_EXTN=g3 + + # The binaries we need; please check carefully !!! + BASENAME=basename +@@ -63,14 +64,23 @@ + + # Some miscellaneous data and filenames. + TMP=/tmp +-MAIL_MESS=$TMP/MESS_$$ +-ERRO_MESS=$TMP/ERRO_$$ +-IMAG_FILE=$TMP/TIFF_$$ +-MIME_MESS=$TMP/MAIL_$$ ++MAIL_MESS=`/bin/tempfile -pMESS_` ++ERRO_MESS=`/bin/tempfile -pERRO_` ++IMAG_FILE=`/bin/tempfile -pTIFF_` ++MIME_MESS=`/bin/tempfile -pMAIL_` ++if [ ! -f $MAIL_MESS ] ||\ ++ [ ! -f $ERRO_MESS ] ||\ ++ [ ! -f $IMAG_FILE ] ||\ ++ [ ! -f $MIME_MESS ] ++then ++ echo "Could not create one of the temporary files. Aborting..."; ++ exit 1; ++fi ++ + umask 077 + + # Clean up from previous invocations and trap errors +-$RM -f $MAIL_MESS $ERRO_MESS $IMAG_FILE $MIME_MESS ++# $RM -f $MAIL_MESS $ERRO_MESS $IMAG_FILE $MIME_MESS + trap "$RM -f $MAIL_MESS $ERRO_MESS $IMAG_FILE $MIME_MESS; exit" 0 1 2 15 + + # Essential lines to put into the header of a MIME mail. +@@ -86,7 +96,7 @@ + ATTACHMENT_ENDLINE="--attachment--" + + # Now we build our MIME mailheader using commandline arguments. +-$ECHO "Subject: incoming FAX from $2 with $3 pages" > $MAIL_MESS ++$ECHO "Subject: incoming FAX from $2 with $3 pages" >> $MAIL_MESS + $ECHO "$HEADERLINE_1" >> $MAIL_MESS + $ECHO "$HEADERLINE_2" >> $MAIL_MESS + $ECHO "" >> $MAIL_MESS +@@ -109,6 +119,9 @@ + # + for i in $@ + do ++if [ "$PBMTOX" = "NONE" ]; then ++ IMAG_FILE=$i ++else + # We use the second character in the filename to identify the + # resolution of our incoming fax, so we can easily scale the fax for + # display on a screen. +@@ -126,7 +139,8 @@ + # handle standard input correctly. + $CAT $i 2>> $ERRO_MESS \ + | $G3TOPBM $STRETCH 2>> $ERRO_MESS \ +- | $PBMTOX >> $IMAG_FILE 2>> $ERRO_MESS ++ | $PBMTOX > $IMAG_FILE 2>> $ERRO_MESS ++fi + # + # Now we put the header for each attachment into our MIME mail. + $ECHO "$ATTACHMENT_HEADERLINE_1" >> $MIME_MESS |