mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-30 17:24:30 +01:00
30 lines
559 B
Batchfile
Executable File
30 lines
559 B
Batchfile
Executable File
@echo off
|
|
|
|
if "%1"=="" goto USAGE
|
|
|
|
echo Scanning for ezusb2 board...
|
|
|
|
:: Yeah, this is one ugly way to pipe stdout to a variable...
|
|
for /f %%i in ('ezusb2-tool.exe scan') do set EZUSBDEV=%%i
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo Error, could not find a connected ezusb2 device
|
|
exit 1
|
|
)
|
|
|
|
echo Found ezusb2 device at path: "%EZUSBDEV%"
|
|
|
|
echo Flashing ezusb2 firmware (%1)...
|
|
ezusb2-tool.exe flash "%EZUSBDEV%" %1
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo Error, flashing ezusb2 board
|
|
exit 1
|
|
)
|
|
|
|
goto END
|
|
|
|
:USAGE
|
|
echo Usage: ezusb2-boot.bat ^<ezusb2.bin^>
|
|
|
|
:END |