59c727af64
http://www.securityfocus.com/archive/1/354362/2004-02-15/2004-02-21/2 * Bump PKGREVISION to 2. * Make patches only modify one file each * Fix some spelling errors * Use ${SED} instead of sed, and ${CHMOD} instead of chmod * Set CFLAGS.SunOS instead of doing the bsd.prefs.mk dance
60 lines
1.5 KiB
Text
60 lines
1.5 KiB
Text
$NetBSD: patch-al,v 1.1 2004/02/25 03:58:43 snj Exp $
|
|
|
|
diff -u -r mm2.7.org/src/bin/showpicture mm2.7/src/bin/showpicture
|
|
--- bin/showpicture Mon Feb 7 10:59:54 1994
|
|
+++ bin/showpicture Wed May 21 21:34:59 1997
|
|
@@ -15,15 +15,42 @@
|
|
# 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
|
|
|
|
if (! $?X_VIEWER) then
|
|
-set X_VIEWER="xloadimage -view -quiet -geometry +1+1"
|
|
+ set X_VIEWER="xloadimage -view -quiet -geometry +1+1"
|
|
# set X_VIEWER="xv -geometry +1+1"
|
|
endif
|
|
-if ($1 == "-viewer" && $#argv > 1) then
|
|
+if ("$1" == "-viewer" && $#argv > 1) then
|
|
set X_VIEWER = "$2"
|
|
shift
|
|
shift
|
|
@@ -57,7 +84,7 @@
|
|
endif
|
|
end
|
|
endif
|
|
- cp $1 $fname
|
|
+ cp "$1" $fname
|
|
if ($status == 0) echo Wrote file $fname
|
|
exit 0
|
|
endif
|