Commit 9559567dfa for ffmpeg
commit 9559567dfa6b57ad9c894bf62330b5b9f9ece8ec
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Fri Sep 11 01:51:47 2026 +0200
tests/md5.sh: probe md5 tools without a subshell
Little bit faster.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/tests/md5.sh b/tests/md5.sh
index 5e2528cc75..fd513c26a2 100644
--- a/tests/md5.sh
+++ b/tests/md5.sh
@@ -1,8 +1,8 @@
# try to find an md5 program
-if [ X"$(echo | md5sum -b 2> /dev/null)" != X ]; then
+if md5sum -b < /dev/null > /dev/null 2>&1; then
do_md5sum() { md5sum -b $1; }
-elif [ X"$(echo | command md5 2> /dev/null)" != X ]; then
+elif command md5 < /dev/null > /dev/null 2>&1; 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 */'; }