From: mdw Date: Sat, 20 Jan 2001 12:02:12 +0000 (+0000) Subject: Honour TMPDIR environment variable. X-Git-Tag: 1.2.8~4 X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/commitdiff_plain/8ab91619595699a4ae82b12c03ecd3983ceefbe6 Honour TMPDIR environment variable. --- diff --git a/txtlib.in b/txtlib.in index 441fb7b..6c4fbec 100755 --- a/txtlib.in +++ b/txtlib.in @@ -2,7 +2,7 @@ # -*-sh-*- # -# $Id: txtlib.in,v 1.2 1999/11/11 17:49:15 mdw Exp $ +# $Id: txtlib.in,v 1.3 2001/01/20 12:02:12 mdw Exp $ # # Manipulate simple libraries of text chunks # @@ -30,6 +30,9 @@ #----- Revision history ----------------------------------------------------- # # $Log: txtlib.in,v $ +# Revision 1.3 2001/01/20 12:02:12 mdw +# Honour TMPDIR environment variable. +# # Revision 1.2 1999/11/11 17:49:15 mdw # Regular expression fixes for parsing version numbers. # @@ -67,7 +70,7 @@ EOF exit 0 ;; -v | --v | --ve | --ver | --vers | --versi | --versio | --version) - version=`echo '$Revision: 1.2 $' | + version=`echo '$Revision: 1.3 $' | sed -n -e 's;^.*: \([0-9.]*\) *\\$;\1;p'` echo "txtlib $version; Common Files Distribution version @VERSION@" exit 0 @@ -115,7 +118,7 @@ case $mode in sed -n -e "/^.*\*@-\([-a-zA-Z0-9_]*\)-@\*.*$/ s//\1/p" "$@" ;; x) - t=/tmp/txtlib.$$ + t=${TMPDIR-/tmp}/txtlib.$$ if mkdir -m 700 $t; then : else echo >&2 "txtlib: could not create temporary directory"