Skip to content

Commit fe06c36

Browse files
committed
Be respectful of weird places where tar might live.
1 parent d93b74a commit fe06c36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/sh
22
r=${RANDOM-$(date +%s)}
3+
tar=${TAR-$(if (which gtar 2>/dev/null) ; then which gtar ; else echo "tar" ; fi)}
34
mkdir npm-$r \
45
&& cd npm-$r \
5-
&& curl -L http://github.com/isaacs/npm/tarball/master | tar xzf - --strip-components=1 \
6+
&& curl -L http://github.com/isaacs/npm/tarball/master | $tar xzf - --strip-components=1 \
67
&& make uninstall install \
78
&& cd .. \
89
&& rm -rf npm-$r \

0 commit comments

Comments
 (0)