From f3cb9916675ee2270fefd6e8eff676c78914e4d7 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 31 Jul 2012 21:59:53 -0400 Subject: Rewrite oh-copyconfig. --- (limited to 'src/opkbuild.sh') diff --git a/src/opkbuild.sh b/src/opkbuild.sh index c3ae895..80921c1 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -375,57 +375,7 @@ step_platconf() { oh_cv_set step platconf - # TODO: Put this in oh-copyconfig. - if [ -f ../config ]; then - while read -r src dest; do - if [ -z "${src}" -o -z "${dest}" ]; then - oh_error - fi - # Make sure the destination directory exists. - mkdir -p "${dest%/*}" || oh_error - # Find the config package files. - # TODO: Don't hardcode path. - config_dir_base="/usr/share/config/${OH_HOST_PLATFORM}/${OH_SOURCE}" - if [ -d "${config_dir_base}-${OH_SOURCE_VERSION_UPSTREAM}" ]; then - src_base="${config_dir_base}-${OH_SOURCE_VERSION_UPSTREAM}" - elif [ -d "${config_dir_base}" ]; then - src_base="${config_dir_base}" - else - # This shouldn't happen unless the package maintainer neglected - # to add the config package to the package's Build-Depends - # field. - oh_error - fi - # Copy the config file(s). - oh_info - cp -p "${src_base}/${src}" "${dest}" || oh_error - done <../config - fi - for bin_config in ../*.pkg/config; do - while read -r src dest; do - if [ -z "${src}" -o -z "${dest}" ]; then - oh_error - fi - # Make sure the destination directory exists. - mkdir -p "dest/${dest%/*}" || oh_error - # Find the config package files. - # TODO: Don't hardcode path. - config_dir_base="/usr/share/config/${OH_HOST_PLATFORM}/${OH_SOURCE}" - if [ -d "${config_dir_base}-${OH_SOURCE_VERSION_UPSTREAM}" ]; then - src_base="${config_dir_base}-${OH_SOURCE_VERSION_UPSTREAM}" - elif [ -d "${config_dir_base}" ]; then - src_base="${config_dir_base}" - else - # This shouldn't happen unless the package maintainer neglected - # to add the config package to the package's Build-Depends - # field. - oh_error - fi - # Copy the config file(s). - oh_info - cp -p "${src_base}/${src}" "dest/${dest}" || oh_error - done <"${bin_config}" - done + oh-copyconfig step_build } -- cgit v0.9.1