File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
set -e
3
3
4
- tmp_gopath=$( mktemp -d --suffix _play_gopath)
5
- tmp_goroot=$( mktemp -d --suffix _play_goroot)
4
+ tmp=$( mktemp -d " ${TMPDIR:-/ tmp} /gopherjs_playground.XXXXXXXXXX" )
6
5
7
6
cleanup () {
8
- rm -rf " $tmp_gopath "
9
- rm -rf " $tmp_goroot "
7
+ rm -rf " $tmp "
10
8
exit
11
9
}
12
10
@@ -27,7 +25,7 @@ rm -r "$PKG"
27
25
28
26
# Use an empty GOPATH workspace with just gopherjs,
29
27
# so that all the standard library packages get written to GOROOT/pkg.
30
- export GOPATH=" $tmp_gopath "
28
+ export GOPATH=" $tmp /gopath "
31
29
mkdir -p " $GOPATH " /src/github.com/gopherjs/gopherjs
32
30
cp -a " $GOPHERJSGOPATH " /src/github.com/gopherjs/gopherjs/* " $GOPATH " /src/github.com/gopherjs/gopherjs
33
31
@@ -38,8 +36,8 @@ cp "$GOPATH"/pkg/*_js_min/github.com/gopherjs/gopherjs/nosync.a "$PKG"/github.co
38
36
39
37
# Make a copy of GOROOT that is user-writeable,
40
38
# use it to build and copy out standard library packages.
41
- cp -a " $( go env GOROOT) " " $tmp_goroot "
42
- export GOROOT=" $tmp_goroot "
39
+ cp -a " $( go env GOROOT) " " $tmp /goroot "
40
+ export GOROOT=" $tmp /goroot "
43
41
gopherjs install -m \
44
42
archive/tar \
45
43
archive/zip \
You can’t perform that action at this time.
0 commit comments