make testdata: look for other variants of sha1sum

it's shasum / sha1 on osx, bsd variants

Change-Id: I3513ae1740adfb05e9b5777d27d445dafbd22413
This commit is contained in:
James Zern 2014-07-29 20:43:56 -07:00
parent 23fbef216d
commit d6fd2293ea

View File

@ -409,13 +409,16 @@ $(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1
curl -L -o $@ $(call libvpx_test_data_url,$(@F)) curl -L -o $@ $(call libvpx_test_data_url,$(@F))
testdata:: $(LIBVPX_TEST_DATA) testdata:: $(LIBVPX_TEST_DATA)
$(qexec)if [ -x "$$(which sha1sum)" ]; then\ $(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\
[ -x "$$(which shasum)" ] && sha1sum=shasum;\
[ -x "$$(which sha1)" ] && sha1sum=sha1;\
if [ -n "$${sha1sum}" ]; then\
set -e;\ set -e;\
echo "Checking test data:";\ echo "Checking test data:";\
if [ -n "$(LIBVPX_TEST_DATA)" ]; then\ if [ -n "$(LIBVPX_TEST_DATA)" ]; then\
for f in $(call enabled,LIBVPX_TEST_DATA); do\ for f in $(call enabled,LIBVPX_TEST_DATA); do\
grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\ grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\
(cd $(LIBVPX_TEST_DATA_PATH); sha1sum -c);\ (cd $(LIBVPX_TEST_DATA_PATH); $${sha1sum} -c);\
done; \ done; \
fi; \ fi; \
else\ else\