mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00:00
83962004f7
* commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b': tiny_psnr: check for specified sample size less than 1 fate: improve md5sum utility selection rangecoder-test: Drop timer output that clutters stderr Conflicts: tests/tiny_psnr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
14 lines
527 B
Bash
14 lines
527 B
Bash
# try to find an md5 program
|
|
|
|
if [ X"$(echo | md5sum -b 2> /dev/null)" != X ]; then
|
|
do_md5sum() { md5sum -b $1; }
|
|
elif [ X"$(echo | command md5 2> /dev/null)" != X ]; then
|
|
do_md5sum() { command md5 $1 | sed 's#MD5 (\(.*\)) = \(.*\)#\2 *\1#'; }
|
|
elif [ -x /sbin/md5 ]; then
|
|
do_md5sum() { /sbin/md5 -r $1 | sed 's/\([0-9a-f]\) [ *]*/\1 */'; }
|
|
elif openssl version >/dev/null 2>&1; then
|
|
do_md5sum() { openssl md5 $1 | sed 's/MD5(\(.*\))= \(.*\)/\2 *\1/'; }
|
|
else
|
|
do_md5sum() { echo No md5sum program found; }
|
|
fi
|