summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-04-24 19:44:02 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-04-24 19:44:02 (EDT)
commit564513e109fe9160a39160f22ac35c88ea7fe8ba (patch)
tree369bcda61269eba12b59c433bc4de0efb8a40a6f /src
parent63fa875896f8fc883580062180636c9f3b780330 (diff)
Shorten lines in oh-copyconfig.
Diffstat (limited to 'src')
-rw-r--r--src/oh-copyconfig.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/oh-copyconfig.sh b/src/oh-copyconfig.sh
index c81a1a3..27e05eb 100644
--- a/src/oh-copyconfig.sh
+++ b/src/oh-copyconfig.sh
@@ -60,10 +60,11 @@ while read -r type src dest; do
# Make sure the destination directory exists.
mkdir -p "$(dirname "${full_dest}")"
# Find the config package files.
- if [ -d "/usr/share/config/${OH_HOST_PLATFORM}/${OH_SRCPKG}-${OH_PKGVER}" ]; then
- full_src="/usr/share/config/${OH_HOST_PLATFORM}/${OH_SRCPKG}-${OH_PKGVER}/${src}"
- elif [ -d "/usr/share/config/${OH_HOST_PLATFORM}/${OH_SRCPKG}" ]; then
- full_src="/usr/share/config/${OH_HOST_PLATFORM}/${OH_SRCPKG}/${src}"
+ config_dir_base="/usr/share/config/${OH_HOST_PLATFORM}/${OH_SRCPKG}"
+ if [ -d "${config_dir_base}-${OH_PKGVER}" ]; then
+ full_src="${config_dir_base}-${OH_PKGVER}/${src}"
+ elif [ -d "${config_dir_base}" ]; then
+ full_src="${config_dir_base}/${src}"
else
# This shouldn't happen unless the package maintainer neglected to add
# the config package to the package's Build-Depends field.