summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-12 13:55:29 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-12 13:55:29 (EDT)
commita4e75e82625aff1fb9c442c0ef9b6f982a639985 (patch)
tree5713e99140d6020859c9aa286e0a663016164af5
parent2b584dbb527230f44bb61eb83428c80d5e938e0c (diff)
ob-installplatconf: Check for "/" in destination.
With a platconf line like "foo bar", ob-installplatconf would install "foo" to "bar/bar".
-rw-r--r--src/ob-installplatconf.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh
index 466023c..04405b2 100644
--- a/src/ob-installplatconf.sh
+++ b/src/ob-installplatconf.sh
@@ -63,8 +63,11 @@ copy_config()
fi
# Make sure the destination directory exists.
- mkdir -p "${dest_base}/${dest%/*}" || \
- ob_error "$(ob_get_msg 'cant_make_config_dest_dir')" "${dest%/*}"
+ if [ "x${dest%/*}" != "x${dest}" ]; then
+ mkdir -p "${dest_base}/${dest%/*}" || ob_error \
+ "$(ob_get_msg 'cant_make_config_dest_dir')" \
+ "${dest%/*}"
+ fi
# Find the config package files.
src_base=''