blob: 5b4172d323dda69d2bfc28f09a162ee823c88baa [file] [log] [blame]
@echo off
:: This script bootstrap the go toolset and modifies an environment
:: of the calling shell to include correct GOPATH, GOBIN and so.
::
:: Unlike env.py, this script can't be used as a wrapping command,
:: use env.py for that (e.g. "python env.py some_script_that_need_go.py").
SET script_path=%~dp0
SET temp_script=%script_path%\_setup_env.cmd
:: This spits out a bunch of 'set VAR=VALUE' commands.
call vpython %script_path%\env.py > %temp_script%
:: This injects them into shell environment.
call %temp_script%
del %temp_script%
:: To avoid polluting env with crap.
set temp_script=
set script_path=