diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-09-02 10:57:51 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-09-02 10:57:51 +0000 |
commit | 6f16d961a588782f22f54775194a1e66a1ffeb53 (patch) | |
tree | 4fe87d1f8cfe5d7e1ddfe52edb27eb446b70296e /include/shell.sh | |
parent | 799e7a8fa878a9010643c7bac42258f11fd3e0e2 (diff) | |
download | upstream-6f16d961a588782f22f54775194a1e66a1ffeb53.tar.gz upstream-6f16d961a588782f22f54775194a1e66a1ffeb53.tar.bz2 upstream-6f16d961a588782f22f54775194a1e66a1ffeb53.zip |
clean up md5s() shell function
SVN-Revision: 12493
Diffstat (limited to 'include/shell.sh')
-rw-r--r-- | include/shell.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/shell.sh b/include/shell.sh index f6be6c526f..634beedcef 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}' } |