From 9f1b735d76d04665d6324e723e163a52ca27567c Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 27 Nov 2018 23:00:36 -0500 Subject: libmakepkg/executable: don't rely on scoped value of $ret to flag outcomes Elsewhere, we return 1 if a library dropin fails, and when running functions in a loop, we use `|| ret=1` to preserve scope. This ensures the return value of the function remains useful in isolation. Do the same thing here as well. Drop trivial function which wraps a dropin that also uses $ret, since it's no longer needed. Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/libmakepkg/executable/strip.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/libmakepkg/executable/strip.sh.in') diff --git a/scripts/libmakepkg/executable/strip.sh.in b/scripts/libmakepkg/executable/strip.sh.in index a6b81db6..867dc928 100644 --- a/scripts/libmakepkg/executable/strip.sh.in +++ b/scripts/libmakepkg/executable/strip.sh.in @@ -31,7 +31,7 @@ executable_strip() { if check_option "strip" "y"; then if ! type -p strip >/dev/null; then error "$(gettext "Cannot find the %s binary required for object file stripping.")" "strip" - ret=1 + return 1 fi fi } -- cgit v1.2.3-54-g00ecf