X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fshell.sh;h=634beedcef3e17d351f440a765c251ae16f50737;hb=c026f34ce61baf3b94286e4ed5a957295de7f607;hp=1e60692b97fffcc1864146345da6b761cbe6c3f7;hpb=387570cc06ab3aca5824f1856b50a5e3ae5c2dc7;p=oweals%2Fopenwrt.git 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}' +}