X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=include%2Fshell.sh;h=634beedcef3e17d351f440a765c251ae16f50737;hp=1e60692b97fffcc1864146345da6b761cbe6c3f7;hb=9bbd91ef54ed9a6327219e3ab15c53e893a8c834;hpb=c1ad0cad185102972f80defe8fe815e4596a026d diff --git a/include/shell.sh b/include/shell.sh index 1e60692b97..634beedcef 100644 --- a/include/shell.sh +++ b/include/shell.sh @@ -28,3 +28,10 @@ trapret() {( } } )} + +md5s() { + cat "$@" | ( + md5sum 2>/dev/null || + md5 + ) | awk '{print $1}' +}