From 9700dd8643f8f2b1816a1b9a37d595d02801f86d Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 26 Apr 2019 00:25:01 -0400 Subject: src/cmd/build.sh: Delimit command operands --- (limited to 'src') diff --git a/src/cmd/build.sh b/src/cmd/build.sh index 24aff29..a7b6701 100644 --- a/src/cmd/build.sh +++ b/src/cmd/build.sh @@ -27,7 +27,7 @@ cmd_build_make_deps_pkg() local pkg_dir= pkg_dir="${cmd_build_root}$(session_dir)/builddeps" - mkdir -p "${pkg_dir}/control" "${pkg_dir}/data" + mkdir -p -- "${pkg_dir}/control" "${pkg_dir}/data" printf '2.0\n' >"${pkg_dir}/debian-binary" cat >"${pkg_dir}/control/control" <<-EOF Package: prokit-builddeps-$(session_id) @@ -38,11 +38,11 @@ cmd_build_make_deps_pkg() Depends: ${cmd_build_build_deps} Description: Build dependencies metapackage generated by prokit EOF - (cd "${pkg_dir}/data"; tar -czf ../data.tar.gz .) - (cd "${pkg_dir}/control"; tar -czf ../control.tar.gz .) - (cd "${pkg_dir}"; tar -czf ../builddeps.opk \ + (cd -- "${pkg_dir}/data"; tar -czf ../data.tar.gz .) + (cd -- "${pkg_dir}/control"; tar -czf ../control.tar.gz .) + (cd -- "${pkg_dir}"; tar -czf ../builddeps.opk \ 'debian-binary' 'data.tar.gz' 'control.tar.gz') - rm -Rf "${pkg_dir}" + rm -Rf -- "${pkg_dir}" } cmd_build_fini() @@ -55,7 +55,7 @@ cmd_build_fini() if [ "x${cmd_build_build_deps}" != 'x' ]; then session_exec opkg --autoremove remove \ prokit-builddeps-$(session_id) - rm -f "${cmd_build_root}${session_dir}/builddeps.opk" + rm -f -- "${cmd_build_root}${session_dir}/builddeps.opk" # Hack to avoid this code branch if the function is called again # in response to a signal. cmd_build_build_deps='' @@ -96,9 +96,9 @@ cmd_build_main() cmd_build_root="${root}" - opkbuild_optstring="$(cat "${root}/usr/share/opkbuild/optstring")" - arch="$(cat "${root}/etc/proteanos_arch")" - plat="$(cat "${root}/etc/proteanos_plat")" + opkbuild_optstring="$(cat -- "${root}/usr/share/opkbuild/optstring")" + arch="$(cat -- "${root}/etc/proteanos_arch")" + plat="$(cat -- "${root}/etc/proteanos_plat")" while getopts "${opkbuild_optstring}" opt 2>/dev/null; do case "${opt}" in a) arch="${OPTARG}";; -- cgit v0.9.1