diff --git a/tools/checksum/md5sum.sh b/tools/checksum/md5sum.sh index 2e2a2d7..99ec4e4 100755 --- a/tools/checksum/md5sum.sh +++ b/tools/checksum/md5sum.sh @@ -21,16 +21,24 @@ source "$SCRIPTS_DIR/common/echo.sh" source "$SCRIPTS_DIR/common/host.sh" if [ "$HOST_OS" = "Linux" ]; then - MD5SUM="md5sum" + _md5sum() { md5sum "$1"; } elif [ "$HOST_OS" = "Mac" ]; then - MD5SUM="md5 -q" + _md5sum() { md5 -q "$1"; } +elif [ "$HOST_OS" = "Win" ]; then + _md5sum() { certutil -hashfile "$1" MD5; } else # unexpected _echo_e "Unknown host os :(" exit 1 fi +PYTHON="python" +if [ "$HOST_OS" = "Win" ]; then + # default python on MSYS + PYTHON="python2" +fi + _get_size() { -PYTHON_ARG="$1" python - <