diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
commit | 1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch) | |
tree | 4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/Linux/md5.sh | |
download | oss4-upstream.tar.gz |
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/Linux/md5.sh')
-rw-r--r-- | setup/Linux/md5.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/setup/Linux/md5.sh b/setup/Linux/md5.sh new file mode 100644 index 0000000..533c12e --- /dev/null +++ b/setup/Linux/md5.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +i=$2 +i=${i#.} + +# Create the MD5 sums file using the program we have found earlier +case "$1" in + MD5SUM) + md5sum ".$i" + ;; + MD5) + x=`md5 ".$i" | awk "{ for (y=1;y<=NF;y++) if ((length(\\$y) == 32) && (\\$y !~ /[\/]/)) {print \\$y; break} }"`; echo "$x $i" + ;; + DIGEST) + x=`digest -a md5 ".$i"`; echo "$x $i" + ;; + OPENSSL) + x=`openssl md5 $i | awk "{ for (y=1;y<=NF;y++) if ((length(\\$y) == 32) && (\\$y !~ /[\/]/)) {print \\$y; break} }"`; echo "$x $i" + ;; +esac |