Annotation of OpenXM/src/util/md5.sh, Revision 1.1
1.1 ! ohara 1: #!/bin/sh
! 2: # $OpenXM$
! 3:
! 4: _freebsd () {
! 5: if [ "`which md5`" ]; then
! 6: md5 $@
! 7: fi
! 8: }
! 9:
! 10: _linux () {
! 11: if [ "`which md5sum`" ]; then
! 12: md5sum $@ | sed -e 's/^\([0-9a-f]*\) \(.*\)$/MD5 (\2) = \1/' "$@"
! 13: fi
! 14: }
! 15:
! 16: _other () {
! 17: if [ "`which md5sum`" ]; then
! 18: md5sum $@ | sed -e 's/^\([0-9a-f]*\) \(.*\)$/MD5 (\2) = \1/' "$@"
! 19: elif [ "`which md5`" ]; then
! 20: md5 $@
! 21: fi
! 22: }
! 23:
! 24: case "`uname`" in
! 25: *BSD) _freebsd $@ ;;
! 26: Linux) _linux $@ ;;
! 27: *) _other $@ ;;
! 28: esac
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>