util/scripts: Support cygwin in ucode conversion tool

Check for the existence of TMPFILE with a .exe extension and if found
rename it with no extension.  This allows the program to be run and
removed properly.

Change-Id: I26928f9b8bf82d1c07fa456a88d624f7a8838bd3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/15437
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Marshall Dawson 2016-06-25 10:17:07 -06:00 committed by Martin Roth
parent 64444268e2
commit 1bc2b0bed0
1 changed files with 1 additions and 0 deletions

View File

@ -56,5 +56,6 @@ int main(void)
EOF EOF
gcc -o "$TMPFILE" "${TMPFILE}.c" gcc -o "$TMPFILE" "${TMPFILE}.c"
[ -f "${TMPFILE}.exe" ] && mv "${TMPFILE}.exe" "$TMPFILE"
"./$TMPFILE" "./$TMPFILE"
rm "$TMPFILE" "${TMPFILE}.c" rm "$TMPFILE" "${TMPFILE}.c"