X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fshell.sh;h=6389304c24bdd7f798b3a71f957dbfaad9cfa3e5;hb=6c1adb3eecff7e86f7396e1aa443ee1ce947d9ec;hp=1e60692b97fffcc1864146345da6b761cbe6c3f7;hpb=387570cc06ab3aca5824f1856b50a5e3ae5c2dc7;p=lede.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}' +}