Fix cross-platform for checkniceness test

Change-Id: I7ea0aea15b0fbd478748e3c54d1719a9732830ea
This commit is contained in:
Anne Gentle 2017-02-24 18:07:16 -06:00 committed by Anne Gentle
parent 682de53f10
commit b95dd2d355
1 changed files with 4 additions and 3 deletions

View File

@ -3,10 +3,11 @@
# Check that doc/common/glossary entries are alphabetized and prints # Check that doc/common/glossary entries are alphabetized and prints
# list of entries that should be sorted. # list of entries that should be sorted.
export TMPDIR=`/bin/mktemp -d` # Cross-platform (Mac and Linux) commands to make a temporary working directory
trap "rm -rf $TMPDIR" EXIT thetmpdir=`mktemp -d 2>/dev/null || mktemp -d -t 'thetmpdir'`
trap "rm -rf $thetmpdir" EXIT
pushd $TMPDIR pushd $thetmpdir
GLOSSARY=$OLDPWD/doc/common/glossary.rst GLOSSARY=$OLDPWD/doc/common/glossary.rst
grep '^ [a-zA-Z0-9]' $GLOSSARY > glossary_entries grep '^ [a-zA-Z0-9]' $GLOSSARY > glossary_entries