summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-08 13:28:22 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-08 13:28:22 (EDT)
commit22f80292bfe0c3dda4e107fce8d7fbdd68b6c21d (patch)
treedd2780f6a44e8cc09e66bb8531b1c2162ff7f83f
parent984447832a76002a6b75b5231bbc2f23b066f792 (diff)
Make -T option effective.
-rw-r--r--src/opkbuild.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 87c2b3d..fbda51c 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -180,15 +180,10 @@ get_options()
[ -z "${opt_check_build_deps}" ] && opt_check_build_deps='true'
[ -z "${opt_uid0_cmd}" ] && opt_uid0_cmd='fakeroot'
- # Set default target and cleaning behavior.
+ # Set cleaning behavior.
if [ -n "${opt_target}" ]; then
[ -z "${opt_clean}" ] && opt_clean='false'
else
- if [ "${opt_build}" = 'full' ]; then
- opt_target='binary'
- else
- opt_target="${opt_build}"
- fi
[ -z "${opt_clean}" ] && opt_clean='true'
fi
}
@@ -308,8 +303,18 @@ setup_build()
build()
{
- ../build build
- ${opt_uid0_cmd} ../build install
+ case "${opt_target}" in
+ '')
+ ../build build
+ ${opt_uid0_cmd} ../build install
+ ;;
+ 'install'|'install-'*)
+ ${opt_uid0_cmd} ../build "${opt_target}"
+ ;;
+ *)
+ ../build "${opt_target}"
+ ;;
+ esac
ob-installdocs
ob-gencontrol