Skip to content

Commit 71b5c54

Browse files
committed
update.sh: use cp -a instead of cp -r for more accurate copies
1 parent 57a5c6b commit 71b5c54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

playground/update.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rm -r $PKG
2929
# so that all the standard library packages get written to GOROOT/pkg.
3030
export GOPATH="$tmp_gopath"
3131
mkdir -p $GOPATH/src/github.com/gopherjs/gopherjs
32-
cp -r $GOPHERJSGOPATH/src/github.com/gopherjs/gopherjs/* $GOPATH/src/github.com/gopherjs/gopherjs
32+
cp -a $GOPHERJSGOPATH/src/github.com/gopherjs/gopherjs/* $GOPATH/src/github.com/gopherjs/gopherjs
3333

3434
gopherjs install -m github.com/gopherjs/gopherjs/js github.com/gopherjs/gopherjs/nosync
3535
mkdir -p $PKG/github.com/gopherjs/gopherjs
@@ -38,7 +38,7 @@ cp $GOPATH/pkg/*_js_min/github.com/gopherjs/gopherjs/nosync.a $PKG/github.com/go
3838

3939
# Make a copy of GOROOT that is user-writeable,
4040
# use it to build and copy out standard library packages.
41-
cp -r $(go env GOROOT)/. "$tmp_goroot"
41+
cp -a $(go env GOROOT)/. "$tmp_goroot"
4242
export GOROOT="$tmp_goroot"
4343
gopherjs install -m \
4444
archive/tar \
@@ -139,8 +139,8 @@ gopherjs install -m \
139139
unicode/utf16 \
140140
unicode/utf8
141141

142-
cp -r $GOROOT/pkg/*_js_min/* $PKG
143-
cp -r $GOROOT/pkg/*_amd64_js_min/* $PKG
142+
cp -a $GOROOT/pkg/*_js_min/* $PKG
143+
cp -a $GOROOT/pkg/*_amd64_js_min/* $PKG
144144

145145
# Rename all *.a files in $PKG to *.a.js.
146146
find "$PKG" -name "*.a" -exec sh -c 'mv $0 $0.js' {} \;

0 commit comments

Comments
 (0)