summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-08 01:04:45 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-08 01:04:45 (EST)
commitd4ef2a660a18544a7aa4fea90120cb4eceb38a10 (patch)
treec9c14823865e68f6a5246c14e9abdd9139e04b53 /lib
parent782bcd811319a3cb10f024a4c21476d8e489de45 (diff)
Lightly refactor oh_buildsystem_do(), add warning.
Diffstat (limited to 'lib')
-rw-r--r--lib/buildsystem.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/buildsystem.sh b/lib/buildsystem.sh
index 11d581b..5c9579a 100644
--- a/lib/buildsystem.sh
+++ b/lib/buildsystem.sh
@@ -81,7 +81,7 @@ oh_set_buildsystem_option()
oh_buildsystem_do()
{
- _oh_local _ohbsd_step _ohbsd_bs _ohbsd_done
+ _oh_local _ohbsd_step _ohbsd_bs
if [ ${#} -ge 1 ]; then
_ohbsd_step="${1}"
@@ -91,26 +91,25 @@ oh_buildsystem_do()
return ${?}
fi
- _ohbsd_done='false'
-
if [ -n "${_OH_BUILDSYSTEM_SYSTEM}" ]; then
if "_oh_${_OH_BUILDSYSTEM_SYSTEM}_can_${_ohbsd_step}"; then
"_oh_${_OH_BUILDSYSTEM_SYSTEM}_${_ohbsd_step}" "${@}"
- _ohbsd_done='true'
+ _oh_return ${?}
+ return ${?}
fi
else
for _ohbsd_bs in ${_OH_BUILDSYSTEMS}; do
if "_oh_${_ohbsd_bs}_can_${_ohbsd_step}"; then
"_oh_${_ohbsd_bs}_${_ohbsd_step}" "${@}"
- _ohbsd_done='true'
- break
+ _oh_return ${?}
+ return ${?}
fi
done
fi
- if ! ${_ohbsd_done}; then
- : error
- fi
+ ob_warn "$(ob_get_msg 'no_capable_build_sys')"
+ _oh_return 1
+ return ${?}
}
oh_buildsystem_arch()