summaryrefslogtreecommitdiff
path: root/recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/mgetty/mgetty-1.1.30/23-samples_new_fax.mime4
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
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.mime477
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