File: md5

package info (click to toggle)
yorick 2.2.03+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,620 kB
  • ctags: 9,317
  • sloc: ansic: 85,521; sh: 1,665; cpp: 1,282; lisp: 1,234; makefile: 1,034; fortran: 19
file content (15 lines) | stat: -rwxr-xr-x 371 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# freebsd distinfo file needs line formatted by md5 program
# but some systems (e.g.- linux) have md5sum instead
# this script finds either one

base=`basename $1`
if md5 $1 2>/dev/null; then
  :
else
  echo "MD5 ($base) = "`md5sum -b $1 | cut -f 1 -d ' '`
fi

# recent ports versions want file size as well as md5 checksum
#echo "SIZE ($base) = "`wc -c < $1`