Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-09-23 20:24:11 +0400
committerisaacs <i@izs.me>2011-09-23 20:24:11 +0400
commitdfa3c0f992df776ec62acd01562ee83b615d11f9 (patch)
tree12593723b0653a466f10885931437656fd3548c0 /scripts
parenta3bfd2c68d0350d166c013268b7a6c19f1ee807c (diff)
Re #1448 add some output around tar that it's using
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 4fd83fdd5..5757b8bf7 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -67,12 +67,24 @@ fi
BACK="$PWD"
-# sniff for gtar/gmake
-# use which, but don't trust it very much.
-
tar="${TAR}"
if [ -z "$tar" ]; then
- tar=tar
+ tar=`which tar 2>&1`
+ ret=$?
+
+ if [ $ret -eq 0 ] && [ -x "$tar" ]; then
+ echo "tar=$tar"
+ echo "version:"
+ $tar --version
+ ret=$?
+ fi
+
+ if [ $ret -eq 0 ]; then
+ (exit 0)
+ else
+ echo "No suitable tar program found."
+ exit 1
+ fi
fi