UPSTREAM: 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.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/15437
Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I26928f9b8bf82d1c07fa456a88d624f7a8838bd3
Reviewed-on: https://chromium-review.googlesource.com/373735
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Marshall Dawson 2016-06-25 10:17:07 -06:00 committed by chrome-bot
commit 135fd4b46d

View file

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