mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
test: consistently use TMPDIR and same name pattern for temp files
This commit is contained in:
1 parent
958167b91c
commit
f153fcb5a5
1 file changed
+3
-3
@@ -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\ `
|
||||||
|
|||||||
Reference in new issue
Block a user