X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Fshell.sh;h=db4100326277cce3c16e7f9cbb31b57f5bd1c591;hp=1e60692b97fffcc1864146345da6b761cbe6c3f7;hb=000393712e9f30897feb5d592cc6901777494ab4;hpb=437ffd097074a8d756bcfaad18ca7df8388b1701;ds=sidebyside diff --git a/include/shell.sh b/include/shell.sh index 1e60692b97..db41003262 100644 --- a/include/shell.sh +++ b/include/shell.sh @@ -28,3 +28,7 @@ trapret() {( } } )} + +md5s() { + which md5sum 2>&- >&- && md5sum "$@" | awk '{print $1}' || md5 "$@" +}