diff options
| author | Rong-En Fan <rafan@FreeBSD.org> | 2006-12-19 01:47:36 +0000 |
|---|---|---|
| committer | Rong-En Fan <rafan@FreeBSD.org> | 2006-12-19 01:47:36 +0000 |
| commit | 4f0cc5947d897a906a80e723b93e840a18a42394 (patch) | |
| tree | b47da6f760ca1d8941d9aea332415f27c2d3122a /mail/metamail/files/patch-bin_showaudio | |
| parent | - utilize USE_BDB (diff) | |
- Rename patch filenames to match new style
This is mainly for ports/106818.
Submitted by: Jean-Francois Dockes <jean-francois.dockes at wanadoo.fr> (maintainer.
Notes
Notes:
svn path=/head/; revision=180112
Diffstat (limited to 'mail/metamail/files/patch-bin_showaudio')
| -rw-r--r-- | mail/metamail/files/patch-bin_showaudio | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/mail/metamail/files/patch-bin_showaudio b/mail/metamail/files/patch-bin_showaudio new file mode 100644 index 000000000000..6b69cbf86ddb --- /dev/null +++ b/mail/metamail/files/patch-bin_showaudio @@ -0,0 +1,67 @@ +--- bin/showaudio.orig Thu Feb 3 00:21:26 1994 ++++ bin/showaudio Mon Dec 18 11:50:24 2006 +@@ -15,9 +15,35 @@ + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + +- ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + + # First, figure out which machine to play it on! +@@ -33,7 +59,7 @@ + set ORG="Bellcore" + set STDINPUT=0 + if ("$1" == "-p") then +- set AUDIOPHONE=$2 ++ set AUDIOPHONE="$2" + shift + shift + endif +@@ -173,7 +199,7 @@ + set AUDIOPHONE=$< + endif + if ($thishost == $AUDIOPHONEHOST || $thishost == $AUDIOPHONEHOSTLONG) then +- echo Calling Phone number $AUDIOPHONE ++ echo Calling Phone number "$AUDIOPHONE" + echo "You MUST SAY HELLO when you answer the phone, or you will not hear the message." + mail -s "showaudio: `whoami` called $AUDIOPHONE" $AUDIOLOGMAIL < /dev/null + if ($STDINPUT) then +@@ -206,7 +232,7 @@ + echo -n "File name:" + set fname=$< + endif +-cp $1 $fname ++cp "$1" $fname + if ($status == 0) echo Wrote raw audio file: $fname + exit 0 + |
