Permalink
Browse files

Merge pull request #102 from ymst0801/xib-support

Add .xib support.
  • Loading branch information...
2 parents aa4549f + 83f140f commit eb15d1191673a9716dbc6f1a9e895b263bfeaff7 @alloy alloy 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 eb15d11

Please sign in to comment.