From 564513e109fe9160a39160f22ac35c88ea7fe8ba Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 24 Apr 2012 19:44:02 -0400 Subject: Shorten lines in oh-copyconfig. --- (limited to 'src') 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. -- cgit v0.9.1