Copy the [checksum detection code in from ruby-install](https://github.com/postmodern/ruby-install/blob/master/share/ruby-install/checksums.sh#L5-L22), in case someone runs `update.sh` on a non-Linux/non-GNU system that does not have the `sha1sum`, etc, commands.