diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-08-26 15:10:18 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-08-26 15:10:18 +0100 |
| commit | 150c9823e71a161e97003849cf8b2f55b21520bd (patch) | |
| tree | 3559c840cf403d1386708b2591d58f928c7b160d /ffmpeg1/tests/md5.sh | |
| parent | b4b1e2630c95d5e6014463f7608d59dc2322a3b8 (diff) | |
adding ffmpeg specific version
Diffstat (limited to 'ffmpeg1/tests/md5.sh')
| -rw-r--r-- | ffmpeg1/tests/md5.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ffmpeg1/tests/md5.sh b/ffmpeg1/tests/md5.sh new file mode 100644 index 0000000..5e2528c --- /dev/null +++ b/ffmpeg1/tests/md5.sh @@ -0,0 +1,13 @@ +# 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 |
