From dec534c22b801a04aac5054710e4ec664264e63e Mon Sep 17 00:00:00 2001 From: mpl Date: Wed, 29 Feb 2012 11:44:59 +0100 Subject: [PATCH] use local gopath if GOPATH not set Change-Id: Iee017e7fdd8913792e9491650bc6f88529c1b4f6 --- build.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.pl b/build.pl index 751306c30..9b4c60996 100755 --- a/build.pl +++ b/build.pl @@ -294,6 +294,13 @@ sub perform_go_check() { return 1; } +sub check_gopath { + return unless $ENV{GOPATH}; + my $gopath = "$FindBin::Bin/gopath"; + print "\$GOPATH not set. Using local gopath of $gopath\n"; + $ENV{GOPATH} = $gopath; +} + sub make_symlink { my ($old, $new) = @_; $old =~ s!/+!/!g;