summaryrefslogtreecommitdiffstats
path: root/src/oh-copyconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/oh-copyconfig.sh')
-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.