diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-17 18:07:50 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-17 18:07:50 (EDT) |
commit | 81eb54a2df65f849e7b0912887c6ee7f570bab2f (patch) | |
tree | 582933d12fc16c96ef7e620810e0adbe566ebef3 /src | |
parent | a619483c23e2b84332d287de48997738a79f835b (diff) |
ob-applypatches: Declare local variables and wrap long lines
Diffstat (limited to 'src')
-rw-r--r-- | src/ob-applypatches.sh | 14 |
1 files changed, 10 insertions, 4 deletions
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 .. |