Add convenience batch script for Win

This commit is contained in:
Jakub Konka
2019-05-20 14:02:35 +02:00
committed by Dan Gohman
parent c3ff3cf075
commit 9ae766db2f
3 changed files with 64 additions and 2 deletions

17
format-all.bat Normal file
View File

@@ -0,0 +1,17 @@
@echo off
setlocal
@rem Format all sources using rustfmt.
@rem This script is an adaption of the shell version
@rem 'format-all.sh'.
for /F "delims=" %%i in ("%%~f0") do set dirname=%%~dpi
cd %dirname%
@REM Make sure we can find rustfmt
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
cmd /C cargo +stable fmt --all -- %*
endlocal
exit /b %ERRORLEVEL%