2019-12-20 17:26:26 +00:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
docker --version >NUL 2>NUL
|
|
|
|
if errorlevel 1 goto :no-docker
|
|
|
|
|
|
|
|
cd /d "%~dp0.."
|
|
|
|
if errorlevel 1 goto err
|
|
|
|
set SRC_DIR=%CD%
|
|
|
|
|
2019-12-20 18:10:33 +00:00
|
|
|
docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:latest fix
|
2019-12-20 17:44:45 +00:00
|
|
|
if errorlevel 1 goto :err
|
2019-12-20 17:26:26 +00:00
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:no-docker
|
|
|
|
echo Docker is not installed, or it's not running >&2
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:err
|
|
|
|
echo ERROR! >&2
|
|
|
|
goto :eof
|