summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2012-02-16 10:44:55 +1100
committerAlex Brainman <alex.brainman@gmail.com>2012-02-16 10:44:55 +1100
commit32b4758191a89ed6c654f6a7df9c267d72893f27 (patch)
treeffc7c1e005e88d56c7ceff582bd11d80433969df
parent564fa6b42b1eff9eb285dffdd1050ac946c696fc (diff)
downloadgo-32b4758191a89ed6c654f6a7df9c267d72893f27.tar.gz
build: use setlocal in run.bat
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/5672061
-rw-r--r--src/all.bat2
-rw-r--r--src/run.bat7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/all.bat b/src/all.bat
index 980f937ef..e3b61c012 100644
--- a/src/all.bat
+++ b/src/all.bat
@@ -13,7 +13,7 @@ goto end
call make.bat --no-banner --no-local
if %GOBUILDFAIL%==1 goto end
-call run.bat --no-rebuild
+call run.bat --no-rebuild --no-local
if %GOBUILDFAIL%==1 goto end
go tool dist banner
diff --git a/src/run.bat b/src/run.bat
index 3fb118341..f258ae10f 100644
--- a/src/run.bat
+++ b/src/run.bat
@@ -3,6 +3,13 @@
:: license that can be found in the LICENSE file.
@echo off
+:: Keep environment variables within this script
+:: unless invoked with --no-local.
+if x%1==x--no-local goto nolocal
+if x%2==x--no-local goto nolocal
+setlocal
+:nolocal
+
set GOBUILDFAIL=0
rem TODO avoid rebuild if possible