mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
updated for version 7.0048
This commit is contained in:
@ -11,11 +11,24 @@
|
||||
#
|
||||
# Neil Schemenauer <nascheme@ucalgary.ca>
|
||||
# March 1999
|
||||
#
|
||||
# Safe method for the temp file by Javier Fern<72>ndez-Sanguino_Pe<50>a
|
||||
|
||||
INFILE=$1
|
||||
OUTFILE=/tmp/vimspell.$$
|
||||
# if you have "tempfile", use the following line
|
||||
#OUTFILE=`tempfile`
|
||||
tmp="${TMPDIR-/tmp}"
|
||||
OUTFILE=`mktemp -t vimspellXXXXXX || tempfile -p vimspell || echo none`
|
||||
# If the standard commands failed then create the file
|
||||
# since we cannot create a directory (we cannot remove it on exit)
|
||||
# create a file in the safest way possible.
|
||||
if test "$OUTFILE" = none; then
|
||||
OUTFILE=$tmp/vimspell$$
|
||||
[ -e $OUTFILE ] && { echo "Cannot use temporary file $OUTFILE, it already exists!; exit 1 ; }
|
||||
(umask 077; touch $OUTFILE)
|
||||
fi
|
||||
# Note the copy of vimspell cannot be deleted on exit since it is
|
||||
# used by vim, otherwise it should do this:
|
||||
# trap "rm -f $OUTFILE" 0 1 2 3 9 11 13 15
|
||||
|
||||
|
||||
#
|
||||
# local spellings
|
||||
|
Reference in New Issue
Block a user