support/check-kernel-headers: use mktemp instead of hand-crafted temp file
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 6 Apr 2014 14:59:28 +0000 (16:59 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 6 Apr 2014 15:12:04 +0000 (17:12 +0200)
Instead of creating a temporary files with a dubious scheme, use mktemp,
which purpose is exactly that: creating temporary files

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/check-kernel-headers.sh

index b511a086c1f6701b0a247d094761f39411cb4d68..2a0a301eda2cbbc02b779019329b3d4f3fe495d6 100755 (executable)
@@ -8,7 +8,7 @@ HDR_M="${HDR_VER%%.*}"
 HDR_V="${HDR_VER#*.}"
 HDR_m="${HDR_V%%.*}"
 
-EXEC="/tmp/br.check-headers.$(uuidgen)"
+EXEC="$(mktemp --tmpdir check-headers.XXXXXX)"
 
 # By the time we get here, we do not always have the staging-dir
 # already populated (think external toolchain), so we can not use