summaryrefslogtreecommitdiff
path: root/include/shell.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-09-02 10:57:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-09-02 10:57:51 +0000
commit6f16d961a588782f22f54775194a1e66a1ffeb53 (patch)
tree4fe87d1f8cfe5d7e1ddfe52edb27eb446b70296e /include/shell.sh
parent799e7a8fa878a9010643c7bac42258f11fd3e0e2 (diff)
downloadmtk-20170518-6f16d961a588782f22f54775194a1e66a1ffeb53.zip
mtk-20170518-6f16d961a588782f22f54775194a1e66a1ffeb53.tar.gz
mtk-20170518-6f16d961a588782f22f54775194a1e66a1ffeb53.tar.bz2
clean up md5s() shell function
SVN-Revision: 12493
Diffstat (limited to 'include/shell.sh')
-rw-r--r--include/shell.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/shell.sh b/include/shell.sh
index f6be6c5..634beed 100644
--- a/include/shell.sh
+++ b/include/shell.sh
@@ -30,5 +30,8 @@ trapret() {(
)}
md5s() {
- which md5sum 2>&1 >/dev/null && md5sum "$@" | awk '{print $1}' || md5 "$@"
+ cat "$@" | (
+ md5sum 2>/dev/null ||
+ md5
+ ) | awk '{print $1}'
}