use local gopath if GOPATH not set

Change-Id: Iee017e7fdd8913792e9491650bc6f88529c1b4f6
This commit is contained in:
mpl 2012-02-29 11:44:59 +01:00
parent 5d9f13ccab
commit dec534c22b
1 changed files with 7 additions and 0 deletions

View File

@ -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;