summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ob-applypatches.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh
index 3339a48..999b0cd 100644
--- a/src/ob-applypatches.sh
+++ b/src/ob-applypatches.sh
@@ -28,6 +28,7 @@ apply_patches()
applied='false'
if [ -d '../patches' ] && [ -d 'src' ]; then
+ cd 'src/'
# 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
@@ -35,21 +36,20 @@ apply_patches()
# set a standard locale.
orig_lang="${LANG}"
LANG='POSIX'
- for patch in '../patches/'*; do
+ for patch in '../../patches/'*; do
[ -f "${patch}" ] || continue
LANG="${orig_lang}"
- patch="${patch#../patches/}"
+ patch="${patch#../../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}"
return 1
fi
- cd ..
applied='true'
done
LANG="${orig_lang}"
+ cd '../'
fi
${applied} || ob_info "$(ob_get_msg 'no_patches')"