#!/bin/bash BUILD_ROOT=`(cd $(dirname $0)/.. && pwd)` export BUILD_ROOT umask 022 . ${BUILD_ROOT}/build/lib/common.sh . ${BUILD_ROOT}/build/lib/VARS STAGE_DIR="${BUILD_ROOT}/staging" STAGE_INSTALL_DIR="${STAGE_DIR}/install-root" STAGE_COMP_DIR="${STAGE_DIR}/components" PKG_NAME="$1" COMP_NAME="$2" PKG_POPULATE_DIR="${BUILD_ROOT}/staging/packaging/${PKG_NAME}/populate" if [ -z "${PKG_NAME}" ] || [ -z "${COMP_NAME}" ]; then warn "Usage: $0 " exit 1 fi if [ ! -f "${BUILD_ROOT}/build/packages/${PKG_NAME}/${PKG_NAME}.func" ]; then warn "Invalid package name \"${PKG_NAME}\"." exit 1 fi if [ ! -f "${BUILD_ROOT}/build/components/${COMP_NAME}.comp" ]; then warn "Invalid component name \"${COMP_NAME}\"." exit 1 fi . "${BUILD_ROOT}/build/components/${COMP_NAME}.comp" if [ ! -d "${PKG_POPULATE_DIR}" ]; then mkdir -p "${PKG_POPULATE_DIR}" exit_on_error $? fi component_populate "${PKG_POPULATE_DIR}"