version 1.4, 1996/06/26 05:36:09 |
version 1.5, 1996/09/16 01:16:27 |
|
|
esac |
esac |
|
|
# temporary files |
# temporary files |
R=/tmp/_reference_$$ |
TDIR=/tmp/_lorder$$ |
S=/tmp/_symbol_$$ |
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 |
# 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 |
# 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. |
# object file. Echo it twice, just to make sure it gets into the output. |
|
|
sort +1 $R -o $R |
sort +1 $R -o $R |
sort +1 $S -o $S |
sort +1 $S -o $S |
join -j 2 -o 1.1 2.1 $R $S |
join -j 2 -o 1.1 2.1 $R $S |
rm -f $R $S |
rm -rf $TDIR |