#!/bin/sh -
-# $OpenBSD: lorder.sh,v 1.2 1996/06/26 05:36:09 deraadt Exp $
+# $OpenBSD: lorder.sh,v 1.3 1996/09/16 01:16:27 deraadt Exp $
# $NetBSD: lorder.sh,v 1.3 1995/04/24 07:38:52 cgd Exp $
#
# Copyright (c) 1990, 1993
esac
# temporary files
-R=/tmp/_reference_$$
-S=/tmp/_symbol_$$
+TDIR=/tmp/_lorder$$
+R=$TDIR/reference
+S=$TDIR/symbol
+
+um=`umask`
+umask 022
+if ! mkdir $TDIR ; then
+ echo temporary directory exists $TDIR
+ exit 1
+fi
+umask $um
# remove temporary files on HUP, INT, QUIT, PIPE, TERM
trap "rm -f $R $S; exit 1" 1 2 3 13 15
sort +1 $R -o $R
sort +1 $S -o $S
join -j 2 -o 1.1 2.1 $R $S
-rm -f $R $S
+rm -rf $TDIR
#!/bin/sh -
-# $OpenBSD: lorder.sh.gnm,v 1.4 1996/06/26 05:36:09 deraadt Exp $
+# $OpenBSD: lorder.sh.gnm,v 1.5 1996/09/16 01:16:27 deraadt Exp $
# $NetBSD: lorder.sh.gnm,v 1.3 1995/12/20 04:45:11 cgd Exp $
#
# Copyright (c) 1990, 1993
esac
# temporary files
-R=/tmp/_reference_$$
-S=/tmp/_symbol_$$
+TDIR=/tmp/_lorder$$
+R=$TDIR/reference
+S=$TDIR/symbol
+
+um=`umask`
+umask 022
+if ! mkdir $TDIR ; then
+ echo temporary directory exists $TDIR
+ exit 1
+fi
+umask $um
# remove temporary files on HUP, INT, QUIT, PIPE, TERM
-trap "rm -f $R $S; exit 1" 1 2 3 13 15
+trap "rm -rf $TDIR; exit 1" 1 2 3 13 15
# if the line ends in a colon, assume it's the first occurrence of a new
# object file. Echo it twice, just to make sure it gets into the output.
sort +1 $R -o $R
sort +1 $S -o $S
join -j 2 -o 1.1 2.1 $R $S
-rm -f $R $S
+rm -rf $TDIR
#!/bin/sh -
#
-# $OpenBSD: mkdep.append,v 1.2 1996/06/26 05:37:07 deraadt Exp $
+# $OpenBSD: mkdep.append,v 1.3 1996/09/16 01:20:02 deraadt Exp $
# $NetBSD: mkdep.append,v 1.2 1994/12/23 07:34:57 jtc Exp $
#
# Copyright (c) 1991, 1993
exit 1
fi
-TMP=/tmp/mkdep$$
+DTMP=/tmp/_mkdep$$
+TMP=$DTMP/mkdep
-trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
+um=`umask`
+umask 022
+if ! mkdir $DTMP ; then
+ echo failed to create tmp dir $DTMP
+ exit 1
+fi
+umask $um
+trap 'rm -rf $DTMP ; exit 1' 1 2 3 13 15
cp $MAKE ${MAKE}.bak
# copy to preserve permissions
cp $TMP $MAKE
-rm -f ${MAKE}.bak $TMP
+rm -rf ${MAKE}.bak $DTMP
exit 0
#!/bin/sh -
#
-# $OpenBSD: mkdep.gcc.sh,v 1.2 1996/06/26 05:37:07 deraadt Exp $
+# $OpenBSD: mkdep.gcc.sh,v 1.3 1996/09/16 01:20:02 deraadt Exp $
# $NetBSD: mkdep.gcc.sh,v 1.9 1994/12/23 07:34:59 jtc Exp $
#
# Copyright (c) 1991, 1993
exit 1
fi
-TMP=/tmp/mkdep$$
+DTMP=/tmp/mkdep$$
+TMP=$DTMP/mkdep
-trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
+um=`umask`
+umask 022
+if ! mkdir $DTMP ; then
+ echo failed to create tmp dir $DTMP
+ exit 1
+fi
+umask $um
+trap 'rm -rf $DTMP ; exit 1' 1 2 3 13 15
if [ x$pflag = x ]; then
gcc -M "$@" | sed -e 's; \./; ;g' > $TMP
if [ $? != 0 ]; then
echo 'mkdep: compile failed.'
- rm -f $TMP
+ rm -rf $DTMP
exit 1
fi
if [ $append = 1 ]; then
cat $TMP >> $D
- rm -f $TMP
+ rm -rf $DTMP
else
mv $TMP $D
fi
#!/bin/sh -
#
-# $OpenBSD: mkdep.old.compiler,v 1.2 1996/06/26 05:37:08 deraadt Exp $
+# $OpenBSD: mkdep.old.compiler,v 1.3 1996/09/16 01:20:02 deraadt Exp $
# $NetBSD: mkdep.old.compiler,v 1.2 1994/12/23 07:35:00 jtc Exp $
#
# Copyright (c) 1991, 1993
exit 1
fi
-TMP=/tmp/mkdep$$
+DTMP=/tmp/_mkdep$$
+TMP=$DTMP/mkdep
-trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
+um=`umask`
+umask 022
+if ! mkdir $DTMP ; then
+ echo failed to create tmp dir $DTMP
+ exit 1
+fi
+umask $um
+trap 'rm -rf $DTMP ; exit 1' 1 2 3 13 15
cp $MAKE ${MAKE}.bak
sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP
# copy to preserve permissions
cp $TMP $MAKE
-rm -f $TMP
+rm -rf $DTMP
exit 0
#!/bin/sh -
#
-# $OpenBSD: mkdep.sh,v 1.2 1996/06/26 05:37:08 deraadt Exp $
+# $OpenBSD: mkdep.sh,v 1.3 1996/09/16 01:20:03 deraadt Exp $
# $NetBSD: mkdep.sh,v 1.3 1994/12/23 07:35:02 jtc Exp $
#
# Copyright (c) 1991, 1993
exit 1
fi
-TMP=/tmp/mkdep$$
+DTMP=/tmp/_mkdep$$
+TMP=$DTMP/mkdep
-trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
+um=`umask`
+umask 022
+if ! mkdir $DTMP ; then
+ echo failed to create tmp dir $DTMP
+ exit 1
+fi
+umask $um
+trap 'rm -rf $DTMP ; exit 1' 1 2 3 13 15
cc -M $* |
sed "
if [ $? != 0 ]; then
echo 'mkdep: compile failed.'
- rm -f $TMP
+ rm -rf $DTMP
exit 1
fi
if [ $append = 1 ]; then
cat $TMP >> $D
- rm -f $TMP
+ rm -rf $DTMP
else
mv $TMP $D
fi
#!/bin/sh -
#
-# $OpenBSD: mkdep.ultrix,v 1.2 1996/06/26 05:37:09 deraadt Exp $
+# $OpenBSD: mkdep.ultrix,v 1.3 1996/09/16 01:20:03 deraadt Exp $
# $NetBSD: mkdep.ultrix,v 1.2 1994/12/23 07:35:04 jtc Exp $
#
# Copyright (c) 1991, 1993
exit 1
fi
-TMP=/tmp/mkdep$$
+DTMP=/tmp/_mkdep$$
+TMP=$DTMP/mkdep
-trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
+um=`umask`
+umask 022
+if ! mkdir $DTMP ; then
+ echo failed to create tmp dir $DTMP
+ exit 1
+fi
+umask $um
+trap 'rm -rf $DTMP ; exit 1' 1 2 3 13 15
cp $MAKE ${MAKE}.bak
# copy to preserve permissions
cp $TMP $MAKE
-rm -f ${MAKE}.bak $TMP
+rm -rf ${MAKE}.bak $DTMP
exit 0