clean up md5s() shell function

SVN-Revision: 12493
This commit is contained in:
Felix Fietkau 2008-09-02 10:57:51 +00:00
parent 799e7a8fa8
commit 6f16d961a5

View file

@ -30,5 +30,8 @@ trapret() {(
)}
md5s() {
which md5sum 2>&1 >/dev/null && md5sum "$@" | awk '{print $1}' || md5 "$@"
cat "$@" | (
md5sum 2>/dev/null ||
md5
) | awk '{print $1}'
}