summaryrefslogtreecommitdiffstats
path: root/src/ob-installplatconf.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 18:50:33 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 18:53:16 (EDT)
commit575858a3709d03b6348add5721cd02e320b424bf (patch)
tree3dfe629809b67e2ace96fe959d04bf9795f4a8c5 /src/ob-installplatconf.sh
parentbfc5e48be90383aea647a061b8d97518c4274551 (diff)
Protect against cmd operands beginning with "-"
Diffstat (limited to 'src/ob-installplatconf.sh')
-rw-r--r--src/ob-installplatconf.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh
index d980ff8..1ee90cd 100644
--- a/src/ob-installplatconf.sh
+++ b/src/ob-installplatconf.sh
@@ -37,8 +37,8 @@ copy_config()
fi
# Make sure the destination directory exists.
- dir="(dirname "${dest_base}/${dest}")"
- if ! mkdir -p "${dir}"; then
+ dir="$(dirname -- "${dest_base}/${dest}")"
+ if ! mkdir -p -- "${dir}"; then
ob_error "$(ob_get_msg 'cant_make_config_dest_dir')" \
"${dir}"
return 1
@@ -64,7 +64,7 @@ copy_config()
# Copy the config file(s).
ob_info "$(ob_get_msg 'copying_config_file')" "${src}" "${dest}"
- if ! cp -p "${src_base}/${src}" "${dest_base}/${dest}"; then
+ if ! cp -p -- "${src_base}/${src}" "${dest_base}/${dest}"; then
ob_error "$(ob_get_msg 'cant_copy_config_file')"
return 1
fi