xcompile: move tempfile cleanup closer together
Change-Id: I4fb3041d505402de3cbcd7ec079dde5e168a90cf Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/5744 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
ee46712da0
commit
adc241326c
|
@ -33,6 +33,12 @@ clean_up() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Create temporary file(s).
|
||||
TMPFILE="$(mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz)"
|
||||
touch "$TMPFILE"
|
||||
trap clean_up EXIT
|
||||
|
||||
|
||||
program_exists() {
|
||||
type "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
@ -155,11 +161,6 @@ AR_${TARCH}:=${GCCPREFIX}ar
|
|||
EOF
|
||||
}
|
||||
|
||||
# Create temporary file(s).
|
||||
TMPFILE="$(mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz)"
|
||||
touch "$TMPFILE"
|
||||
trap clean_up EXIT
|
||||
|
||||
# Architecture definition
|
||||
SUPPORTED_ARCHITECTURE="x86 armv7 aarch64"
|
||||
|
||||
|
|
Loading…
Reference in New Issue