Sha256: 4c29142ed548546bbde17e155f9643cb5a882a18907c3ebc75673e65edc90c53
Contents?: true
Size: 500 Bytes
Versions: 217
Compression:
Stored size: 500 Bytes
Contents
#!/bin/bash # # Calculates the MD5 hash of a given file. It uses hashing utilities powered by # operating systems, but wraps them into a consistent interface. OS=$( case $(uname) in (Darwin*) echo "mac";; (Linux*) echo "linux";; # TODO: implement MD5 hashing on Windows # (Windows*) echo "windows";; (*) echo "linux";; esac ) case $OS in mac ) md5 -q $@;; linux ) md5sum $@ | sed -E 's/([a-z0-9]{32}).+$/\1/';; esac
Version data entries
217 entries across 217 versions & 1 rubygems