Add some debug logging if tar fails

Summary: This is to help debug the root cause of https://github.com/facebook/react-native/issues/14423

Reviewed By: javache

Differential Revision: D5254713

fbshipit-source-id: 1ca90205144b3a069d927ba6636f0ef0138b51a0
This commit is contained in:
Marc Horowitz 2017-06-15 13:03:23 -07:00 committed by Facebook Github Bot
parent 4fd427e249
commit a555551aaf
1 changed files with 6 additions and 7 deletions

View File

@ -1,10 +1,5 @@
#!/bin/bash
#boostdir="`node ./node_modules/boost-lib/bin/boost-lib download -V 1.63`"
#cd "$boostdir"
#./bootstrap.sh
#./b2 headers
set -e
cachedir="$HOME/.rncache"
@ -23,8 +18,12 @@ function fetch_and_unpack () {
if [ ! -d "third-party/$dir" ]; then
(cd third-party;
echo Unpacking "$cachedir/$file"...
tar zxf "$cachedir/$file"
if ! tar zxf "$cachedir/$file"; then
echo "Unpacking '$cachedir/$file' failed. Debug info:" 2>&1
ls -l "$cachedir/$file" 2>&1
shasum ~/.rncache/boost_1_63_0.tar.gz 2>&1
exit 1
fi
cd "$dir"
eval "${cmd:-true}")
fi