summaryrefslogtreecommitdiffstats
path: root/src/ob-applypatches.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 13:42:06 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 13:42:06 (EDT)
commit8850981d7362f95623b58d5af34343f1f8395eb6 (patch)
tree319a192daf5d5e6315ca6c72197a06ebe29f3243 /src/ob-applypatches.sh
parent176161e071d50ee2f4873d21f8396c03a929c45d (diff)
ob-*: Add return statements after ob_error() calls
Diffstat (limited to 'src/ob-applypatches.sh')
-rw-r--r--src/ob-applypatches.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh
index 2650223..90ccc3d 100644
--- a/src/ob-applypatches.sh
+++ b/src/ob-applypatches.sh
@@ -38,8 +38,10 @@ apply_patches()
patch="${patch#../patches/}"
ob_info "$(ob_get_msg 'applying_patch')" "${patch}"
cd src
- patch -N -p 1 -u -i "../../patches/${patch}" || \
+ 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
@@ -47,6 +49,8 @@ apply_patches()
fi
${applied} || ob_info "$(ob_get_msg 'no_patches')"
+
+ return 0
}
main()
@@ -56,7 +60,9 @@ main()
ob_init_package '..' || exit 1
ob_parse_package_metadata -c '.opkbuild.cache' || exit 1
- apply_patches
+ apply_patches || return 1
+
+ return 0
}
main "${@}"