git clone https://orangeshoelaces.net/git/cfgfoo.git
Author: Vasilii Kolobkov on 12/31/2018
Committer: Vasilii Kolobkov on 12/31/2018
Check whether package installation succeeded with 'pkg_info'
steps/obsd/pkg/add | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/steps/obsd/pkg/add b/steps/obsd/pkg/add
index 9e6864b..c573365 100644
--- a/steps/obsd/pkg/add
+++ b/steps/obsd/pkg/add
@@ -4,4 +4,8 @@ step_taken() {
take_step() {
pkg_add -I "$1"
+ if ! pkg_info -q -e "${1}-*"; then
+ echo 'Failed to install package'
+ return 1
+ fi
}