mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
trap chmod errors in tar unpack on bsd - modes like 02755 fail
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5656 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -13,3 +13,18 @@ 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
|
||||
}
|
||||
}
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user