fix indent

This commit is contained in:
leafee98 2023-04-04 18:00:22 +08:00
parent b83e84b69c
commit b57dab0489

24
makedeb
View file

@ -280,31 +280,31 @@ function decompress_source_file {
} }
error_function() { error_function() {
# first exit all subshells, then print the error # first exit all subshells, then print the error
if (( ! BASH_SUBSHELL )); then if (( ! BASH_SUBSHELL )); then
error "A failure occurred in %s()." "$1" error "A failure occurred in %s()." "$1"
plainerr "$(gettext "Aborting...")" plainerr "$(gettext "Aborting...")"
fi fi
exit $E_USER_FUNCTION_FAILED exit $E_USER_FUNCTION_FAILED
} }
# use less strict shell for custom functions # use less strict shell for custom functions
function run_function_safe { function run_function_safe {
local restoretrap local restoretrap
set +o errtrace set +o errtrace
set +o errexit set +o errexit
restoretrap=$(trap -p ERR) restoretrap=$(trap -p ERR)
trap "error_function '$1'" ERR trap "error_function '$1'" ERR
"$1" "$1"
set -o errtrace set -o errtrace
set -o errexit set -o errexit
trap - ERR trap - ERR
eval "$restoretrap" eval "$restoretrap"
} }
function is_function { function is_function {