From 81eb54a2df65f849e7b0912887c6ee7f570bab2f Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Mar 2019 18:07:50 -0400 Subject: ob-applypatches: Declare local variables and wrap long lines --- (limited to 'src') diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh index bf12890..3339a48 100644 --- a/src/ob-applypatches.sh +++ b/src/ob-applypatches.sh @@ -21,13 +21,18 @@ set -eu apply_patches() { + local applied= + local orig_lang= + local patch= + applied='false' if [ -d '../patches' ] && [ -d 'src' ]; then # Iterate over patches ordered alphabetically by name. - # POSIX.1-2008 says that the results of a pathname expansion shall be - # "sorted according to the collating sequence in effect in the current - # locale". So for consistent results, we first set a standard locale. + # POSIX.1-2008 says that the results of a pathname expansion + # shall be "sorted according to the collating sequence in effect + # in the current locale". So for consistent results, we first + # set a standard locale. orig_lang="${LANG}" LANG='POSIX' for patch in '../patches/'*; do @@ -37,7 +42,8 @@ apply_patches() ob_info "$(ob_get_msg 'applying_patch')" "${patch}" cd src if ! patch -N -p 1 -u -i "../../patches/${patch}"; then - ob_error "$(ob_get_msg 'cant_apply_patch')" "${patch}" + ob_error "$(ob_get_msg 'cant_apply_patch')" \ + "${patch}" return 1 fi cd .. -- cgit v0.9.1