X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=include%2Fshell.sh;h=634beedcef3e17d351f440a765c251ae16f50737;hb=bbc6ab0a0317f5707638956866b87f7bca656e62;hp=1e60692b97fffcc1864146345da6b761cbe6c3f7;hpb=97c8cb1b64a660538b7ef6cf5a9b98f904a8bccc;p=openwrt-10.03%2F.git diff --git a/include/shell.sh b/include/shell.sh index 1e60692b9..634beedce 100644 --- a/include/shell.sh +++ b/include/shell.sh @@ -28,3 +28,10 @@ trapret() {( } } )} + +md5s() { + cat "$@" | ( + md5sum 2>/dev/null || + md5 + ) | awk '{print $1}' +}