mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-16 20:02:35 +03:00
754f9336f0
git-svn-id: svn://kolibrios.org@4349 a494cfbc-eb01-0410-851d-a64ba20cac60
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
|