#!/bin/sh

#  copyFrameworks.sh
#  Capo
#
#  Created by Christopher Liscio on 11-07-05.
#  Copyright 2011 SuperMegaUltraGroovy. All rights reserved.

FRAMEWORKS=${1}
PRIVATE_FRAMEWORKS_PATH=${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}

echo "mkdir -pv ${PRIVATE_FRAMEWORKS_PATH}"
mkdir -pv "${PRIVATE_FRAMEWORKS_PATH}"

for fwk in ${FRAMEWORKS}
do
    FRAMEWORK_NAME=${BUILT_PRODUCTS_DIR}/${fwk}
    echo "cp -RHv "${FRAMEWORK_NAME}" "${PRIVATE_FRAMEWORKS_PATH}/""
    /usr/bin/codesign --force --sign "${CODE_SIGN_IDENTITY}" "${FRAMEWORK_NAME}"
    cp -RHv "${FRAMEWORK_NAME}" "${PRIVATE_FRAMEWORKS_PATH}/"
done
