Allow yaml checks to work with mktemp in a different path

Change-Id: I960c680f1e2bae93fea047a4ef805e6e748dc5b9
Signed-off-by: Graham Hayes <gr@ham.ie>
This commit is contained in:
Graham Hayes 2019-06-28 12:37:19 +01:00
parent 4bff6be36a
commit aaef9cc8f0
No known key found for this signature in database
GPG Key ID: 1B263DC59F4AEFD5
1 changed files with 5 additions and 2 deletions

View File

@ -2,8 +2,11 @@
# Checks that reference/projects.yaml alphabetized and prints list of
# projects that should be sorted.
export TMPDIR=`/bin/mktemp -d`
if [ -x "$(command -v mktemp)" ]; then
export TMPDIR=`mktemp -d`
else
export TMPDIR=`/bin/mktemp -d`
fi
trap "rm -rf $TMPDIR" EXIT
pushd $TMPDIR