X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Fshell.sh;h=6ee0cf6030ac5e0a71d7be1c2438c58ee9724caf;hp=f6be6c526f26fb489cc660d7201bce3c3a1117b7;hb=2ab0963971ef771cfcc2c355ec6d8a47c6ea62ed;hpb=7bdbd73b2a6794ed62ace6cb89070168ae8fd19a diff --git a/include/shell.sh b/include/shell.sh index f6be6c526f..6ee0cf6030 100644 --- a/include/shell.sh +++ b/include/shell.sh @@ -13,22 +13,3 @@ isset() { eval "var=\"\${$1}\"" [ -n "$var" ] } - -trapret() {( - local retvals="$1"; shift - local cmd="$1"; shift - for retval in $(echo $retvals); do - local trap_$retval=1 - done - "$cmd" "$@" || { - local retval="$?" - eval "trapped=\${trap_$retval}" - [ -n "$trapped" ] || { - return $retval - } - } -)} - -md5s() { - which md5sum 2>&1 >/dev/null && md5sum "$@" | awk '{print $1}' || md5 "$@" -}