diff options
-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 .. |