Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37759632
en ru br
ALT Linux repos
S:3.2.06-alt14
5.0: 3.2.06-alt9
4.1: 3.2.06-alt7
4.0: 3.2.06-alt7
3.0: 3.2.06-alt6

Group :: Text tools
RPM: ispell

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: ispell-3.2.06.epa7-alt-tmp.patch
Download


--- ispell-3.2.06.epa7~/findaffix.X	2003-11-09 17:27:50 +0000
+++ ispell-3.2.06.epa7/findaffix.X	2004-07-02 21:09:11 +0000
@@ -131,8 +131,22 @@
 # Get rid of all old RCS log lines in preparation for the 3.1 release.
 #
 #
-TDIR=${TMPDIR-/tmp}/findaffix$$
-( umask 077 && mkdir ${TDIR} || ( echo "can't mkdir " ${TDIR} 1>&2 ; exit 1 ) )
+
+PROG="${0##*/}"
+
+if ! TDIR="$(mktemp -d -t "$PROG.XXXXXXXXXX")"; then
+	echo "$PROG: mktemp failed" >&2
+	exit 1
+fi
+exit_handler()
+{
+	local rc=$?
+	trap - EXIT
+	rm -rf -- "$TDIR"
+	exit $rc
+}
+trap exit_handler SIGHUP SIGPIPE SIGINT SIGTERM EXIT
+
 TMP=${TDIR}/faff$$
 SORTTMP="-T ${TDIR}"			# !!SORTTMP!!
 USAGE='Usage:  findaffix [-p | -s] [-f] [-c] [-e elim] [-m min] [-M max] [-l low] [-t tabch] [files]'
@@ -214,8 +228,7 @@
 	    ;;
     esac
 done
-trap "/bin/rm -rf ${TDIR}; exit 1" 1 2 15
-trap "/bin/rm -rf ${TDIR}; exit 0" 13
+
 #
 # We are ready to do the work.  First, we collect all input, translate it
 # to lowercase, sort it (dropping duplications), and save it for later.
--- ispell-3.2.06.epa7~/munchlist.X	2003-11-09 17:27:51 +0000
+++ ispell-3.2.06.epa7/munchlist.X	2004-07-02 20:59:37 +0000
@@ -154,8 +154,21 @@
 #
 #
 
-TDIR=${TMPDIR-/tmp}/munchlist$$
-( umask 077 && mkdir ${TDIR} || ( echo "can't mkdir " ${TDIR} 1>&2 ; exit 1 ) )
+PROG="${0##*/}"
+
+if ! TDIR="$(mktemp -d -t "PROG.XXXXXXXXXX")"; then
+	echo "$PROG: mktemp failed" >&2
+	exit 1
+fi
+exit_handler()
+{
+	local rc=$?
+	trap - EXIT
+	rm -rf -- "$TDIR"
+	exit $rc
+}
+trap exit_handler SIGHUP SIGPIPE SIGINT SIGTERM EXIT
+
 TMP=${TDIR}/munch$$
 
 if [ "X$MUNCHMAIL" != X ]
@@ -321,7 +334,7 @@
     verbose=true
     debug=yes
 fi
-trap "/bin/rm -rf ${TDIR}; exit 1" 1 2 13 15
+
 #
 # Names of temporary files.  This is just to make the code a little easier
 # to read.
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin