#-----------------------------------------------------
#
# Copy the libraries to their final destination.
#
#-----------------------------------------------------
#
# Add the following code to the run script phase in
# in xcode to invoke this script.
#
# # Create the path to the script.
# TARGET_SCRIPT="$SRCROOT/Source/Install.sh"
#
# # Make sure the script is executable.
# chmod u+x "$TARGET_SCRIPT"
#
# # Execute the script.
# "$TARGET_SCRIPT"
#
#-----------------------------------------------------

# Destination.
DESTINATION_FOLDER=/usr/local/lib/OSXUtilities/

# Remove the directory and recreate it.
rm -rf "${DESTINATION_FOLDER}"
mkdir "${DESTINATION_FOLDER}"
chmod 777 "${DESTINATION_FOLDER}"

#-----------------------------------------------------

# Build the directory paths.
OSX_LIBRARY_DIR=${SYMROOT}/${CONFIGURATION}

# Library names.
OSX_LIBRARY_NAME=OSXUtilities

# Copy over the framework to /usr/local/lib.
cp -R "${OSX_LIBRARY_DIR}/${OSX_LIBRARY_NAME}.framework" "${DESTINATION_FOLDER}"

#-----------------------------------------------------
