summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-15 17:03:22 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-15 17:03:22 (EDT)
commit2c0f14c69bedfbaee24652122f78766aa136cab8 (patch)
treed825796643623a55dfaeed4a7ddc324d28997739
parenta9a2c55a006c2644bd976afc11dc53d2706e767c (diff)
opkbuild: Separate opt_uid0_cmd non-option args.
Otherwise, the option arguments might be collected by the opt_uid0_cmd.
-rw-r--r--src/opkbuild.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index a3ad831..a63bde4 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -193,7 +193,7 @@ get_options()
test_uid0_cmd()
{
# Verify that the UID 0 command works.
- test_uid=$("${opt_uid0_cmd}" id -u)
+ test_uid=$("${opt_uid0_cmd}" -- id -u)
if [ ${?} -ne 0 ]; then
ob_error "$(ob_get_msg 'uid0_cmd_not_found')" "${opt_uid0_cmd}"
@@ -263,7 +263,7 @@ build_source()
src_pkg_data_base="src-${src}.data$(ob_get_system_path 'package-source' \
"${src}" "${ver}")"
- "${opt_uid0_cmd}" mkdir -p \
+ "${opt_uid0_cmd}" -- mkdir -p \
"${src_pkg_data_base}" || \
ob_error "$(ob_get_msg 'cant_make_src_pkg_dir')"
@@ -272,7 +272,7 @@ build_source()
../tmp)
;;
../*)
- "${opt_uid0_cmd}" cp -R "${file}" "${src_pkg_data_base}" || \
+ "${opt_uid0_cmd}" -- cp -R "${file}" "${src_pkg_data_base}" || \
ob_error "$(ob_get_msg 'cant_install_src_pkg_file')"
;;
esac
@@ -328,7 +328,7 @@ build()
case "${opt_target}" in
'')
../build build
- ${opt_uid0_cmd} sh -s <<-EOF
+ ${opt_uid0_cmd} -- sh -s <<-EOF
../build install && \
'@@BINDIR@@/ob-installdocs' && \
'@@BINDIR@@/ob-gencontrol' && \
@@ -339,7 +339,7 @@ build()
fi
;;
'install'|'install-'*)
- if ! ${opt_uid0_cmd} ../build "${opt_target}"; then
+ if ! ${opt_uid0_cmd} -- ../build "${opt_target}"; then
exit 1
fi
;;