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