Remove -p calls from shasum. (#24036)

Summary:
Fixes #22873. Given that this code is meant to only work on macOS, we should be fine not using a portable hash. In the packages for which this matters at the bottom of this file, it produces the same hashes so it should be fine.

[General] [Fixed] - Don't use `-p` when invoking shasum.
Pull Request resolved: https://github.com/facebook/react-native/pull/24036

Differential Revision: D14521134

Pulled By: cpojer

fbshipit-source-id: 882e762b7817d9d46bdd405c9e2e9e8b4d7cfaf4
This commit is contained in:
cpojer
2019-03-19 08:45:36 -07:00
committed by Facebook Github Bot
parent 7e37370ab5
commit 156e483491

View File

@@ -32,12 +32,12 @@ function fetch_and_unpack () {
while true; do
if [ -f "$cachedir/$file" ]; then
if shasum -p "$cachedir/$file" |
if shasum "$cachedir/$file" |
awk -v hash="$hash" '{exit $1 != hash}'; then
break
else
echo "Incorrect hash:" 2>&1
shasum -p "$cachedir/$file" 2>&1
shasum "$cachedir/$file" 2>&1
echo "Retrying..." 2>&1
fi
fi