test: consistently use TMPDIR and same name pattern for temp files
This commit is contained in:
parent
958167b91c
commit
f153fcb5a5
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# create a randome file
|
# create a randome file
|
||||||
file=`mktemp`
|
file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||||
cat >$file <<EOF
|
cat >$file <<EOF
|
||||||
hello world!
|
hello world!
|
||||||
EOF
|
EOF
|
||||||
|
@ -15,12 +15,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
outfile1=`mktemp`
|
outfile1="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||||
@builddir@/grub-shell --files=/boot/grub/file=$file >$outfile1 <<EOF
|
@builddir@/grub-shell --files=/boot/grub/file=$file >$outfile1 <<EOF
|
||||||
sha512sum $grub_file
|
sha512sum $grub_file
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
outfile2=`mktemp`
|
outfile2="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||||
sha512sum $file >$outfile2
|
sha512sum $file >$outfile2
|
||||||
|
|
||||||
SHA1=`cat $outfile1 | tr -d '\n' | cut -f1 -d\ `
|
SHA1=`cat $outfile1 | tr -d '\n' | cut -f1 -d\ `
|
||||||
|
|
Loading…
Reference in a new issue