Permalink
Browse files

Add .xib support.

  • Loading branch information...
1 parent aa4549f commit 83f140fb3e7b26c819d7e7aec9946834daf06bc8 Tsuyoshi Yamashita committed Dec 22, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 lib/cocoapods/generator/copy_resources_script.rb
@@ -6,8 +6,16 @@ class CopyResourcesScript
install_resource()
{
- echo "cp -R ${SRCROOT}/Pods/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
- cp -R "${SRCROOT}/Pods/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
+ case $1 in
+ *\.xib)
+ echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${SRCROOT}/Pods/$1 --sdk ${SDKROOT}"
+ ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${SRCROOT}/Pods/$1 --sdk ${SDKROOT}
+ ;;
+ *)
+ echo "cp -R ${SRCROOT}/Pods/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
+ cp -R "${SRCROOT}/Pods/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
+ ;;
+ esac
}
EOS

0 comments on commit 83f140f

Please sign in to comment.