Statistics
| Branch: | Revision:

ffmpeg / tests / md5.sh @ c90626b2

History | View | Annotate | Download (497 Bytes)

1 fc8cb398 Måns Rullgård
# try to find an md5 program
2
3
if [ X"$(echo | md5sum 2> /dev/null)" != X ]; then
4
    do_md5sum() { md5sum -b $1; }
5
elif [ X"$(echo | md5 2> /dev/null)" != X ]; then
6
    do_md5sum() { md5 $1 | sed 's#MD5 (\(.*\)) = \(.*\)#\2 *\1#'; }
7
elif [ -x /sbin/md5 ]; then
8
    do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
9 ee6184a8 Mans Rullgard
elif openssl version >/dev/null 2>&1; then
10
    do_md5sum() { openssl md5 $1 | sed 's/MD5(\(.*\))= \(.*\)/\2 *\1/'; }
11 fc8cb398 Måns Rullgård
else
12
    do_md5sum() { echo No md5sum program found; }
13
fi