5 # remove old symlink setup
6 rm -rf adium-frameworks
8 # create empty directory to keep linker happy
11 # if Adium is built as sub-project -> skip
12 if [[ ( -d "${BUILT_PRODUCTS_DIR}/Adium.framework" ) ||
13 ( -d "${BUILT_PRODUCTS_DIR}/AdiumLibPurple.framework" ) ||
14 ( -d "${BUILT_PRODUCTS_DIR}/AIUtilities.framework" ) ]]; then
15 echo 1>&2 "Building Adium within SIPEAdiumPlugin - aborting..."
19 _sipe_build_dir
=$
(cd "${BUILT_PRODUCTS_DIR}/../../.."; pwd -P)
20 if [[ ! -d "${_sipe_build_dir}" ]]; then
21 echo 1>&2 "can't detect SIPE build directory from '${BUILT_PRODUCTS_DIR}'"
25 _build_dir
=$
(cd "${_sipe_build_dir}/.."; pwd -P)
26 if [[ ! -d "${_build_dir}" ]]; then
27 echo 1>&2 "can't detect common build directory from '${_sipe_build_dir}'"
31 _adium_build_dir
=( $
(find "${_build_dir}" -maxdepth 1 -type d
-name "Adium-*" ) )
32 if [[ ${#_adium_build_dir[@]} -ne 1 ]]; then
33 echo 1>&2 "can't detect Adium build directory from '${_build_dir}'"
37 # create symlinks to Adium frameworks
38 _frameworks_dir
="${BUILT_PRODUCTS_DIR/#${_sipe_build_dir}/${_adium_build_dir[0]}}"
41 AdiumLibPurple.framework
44 ln -s ${_adium_dirs[@]/#/${_frameworks_dir}/} adium-frameworks
/
47 ls -lhtR adium-frameworks