gopherjs / gopherjs.github.io

GopherJS Playground
https://gopherjs.github.io/playground/
23 stars 12 forks source link

playground: Improve update.sh to be more general. #41

Closed dmitshur closed 8 years ago

dmitshur commented 8 years ago

It does require Go to be at /usr/local/go. This can be improved in the future. It doesn't require Go to be in any hardcoded location.

It uses a temporary staging folder to perform the operations.

Fixes #36.

dominikh commented 8 years ago

Why not use $(go env GOROOT) instead of hard-coding /usr/local/go?

dmitshur commented 8 years ago

That's a good idea, thanks.

I didn't include it in the first version because I knew I couldn't just get GOROOT env var, as it may not be set. But using $(go env GOROOT) will take care of that.

I'll update to include that enhancement (within an hour).

dominikh commented 8 years ago

LGTM otherwise. There are some improvements that could be made to the shell script, but they're not strictly necessary for this PR.

dmitshur commented 8 years ago

Thanks. Squashed and merged as 84b8935b5b4de8c4c81191c2b76c87288e96aa9c.