Skip to content
Browse files

Move shell script creation out of installer

  • Loading branch information...
1 parent fcbef0f commit 17275eb8907264f94a7e4472ef36b601061c6e0e @nolanw nolanw committed Nov 6, 2011
Showing with 13 additions and 8 deletions.
  1. +2 −8 lib/cocoapods/installer.rb
  2. +11 −0 lib/cocoapods/xcode/project.rb
View
10 lib/cocoapods/installer.rb
@@ -219,14 +219,8 @@ def configure_project(projpath)
build_phase.files << libfile.buildFiles.new
end
- copy_resources = app_project.objects.add(Xcode::Project::PBXShellScriptBuildPhase, {
- 'name' => 'Copy Pods Resources',
- 'files' => [],
- 'inputPaths' => [],
- 'outputPaths' => [],
- 'shellPath' => '/bin/sh',
- 'shellScript' => "${SRCROOT}/Pods/Pods-resources.sh\n"
- })
+ copy_resources = app_project.add_shell_script_build_phase('Copy Pods Resources',
+"${SRCROOT}/Pods/Pods-resources.sh\n")
app_project.targets.each { |target| target.buildPhases << copy_resources }
app_project.save_as(projpath)
View
11 lib/cocoapods/xcode/project.rb
@@ -626,6 +626,17 @@ def add_system_framework(name)
'sourceTree' => 'SDKROOT'
})
end
+
+ def add_shell_script_build_phase(name, script_path)
+ objects.add(Xcode::Project::PBXShellScriptBuildPhase, {
+ 'name' => name,
+ 'files' => [],
+ 'inputPaths' => [],
+ 'outputPaths' => [],
+ 'shellPath' => '/bin/sh',
+ 'shellScript' => script_path
+ })
+ end
def build_files
objects.select_by_class(PBXBuildFile)

0 comments on commit 17275eb

Please sign in to comment.
Something went wrong with that request. Please try again.