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/gzip.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/libmakepkg/executable/gzip.sh.in') diff --git a/scripts/libmakepkg/executable/gzip.sh.in b/scripts/libmakepkg/executable/gzip.sh.in index 66748320..bb1626bc 100644 --- a/scripts/libmakepkg/executable/gzip.sh.in +++ b/scripts/libmakepkg/executable/gzip.sh.in @@ -31,7 +31,7 @@ executable_gzip() { if check_option "zipman" "y"; then if ! type -p gzip >/dev/null; then error "$(gettext "Cannot find the %s binary required for compressing man and info pages.")" "gzip" - ret=1 + return 1 fi fi } -- cgit v1.2.3-54-g00ecf