Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Paths corrected, File templates work again, Project templates still n…

…eed updating to the new format
  • Loading branch information...
commit 148d668603c712e9f32a8545ff60d4c2db5271f2 1 parent c4f07a9
@evanfarrar authored
Showing with 21 additions and 19 deletions.
  1. +21 −19 install
View
40 install
@@ -1,30 +1,32 @@
#! /usr/bin/ruby
+require 'fileutils'
-osx_xcode_dir = "/Developer/Library/Xcode"
-iphone_xcode_dir = "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode"
+xcode_template_dir = File.expand_path "~/Library/Developer/Xcode/Templates"
-osx_project_templates_dir = File.join(osx_xcode_dir, "Project Templates")
-iphone_project_templates_dir = File.join(iphone_xcode_dir, "Project Templates")
+project_templates_dir = File.join(xcode_template_dir, "Project Templates", "Application")
+file_templates_dir = File.join(xcode_template_dir, "File Templates")
-osx_file_templates_dir = File.join(osx_xcode_dir, "File Templates")
-iphone_file_templates_dir = File.join(iphone_xcode_dir, "File Templates")
+osx_file_template_dir = File.join(file_templates_dir, 'Cocoa');
+iphone_file_template_dir = File.join(file_templates_dir, 'Cocoa Touch');
+FileUtils.mkdir_p(osx_file_template_dir)
+FileUtils.mkdir_p(iphone_file_template_dir)
+FileUtils.mkdir_p(project_templates_dir)
-cedar_osx_project_template_dir = File.join(osx_project_templates_dir, 'Application', 'Cedar');
-cedar_iphone_project_template_dir = File.join(iphone_project_templates_dir, 'Application', 'Cedar');
+cedar_osx_file_template_dir = File.join(osx_file_template_dir, 'Cedar spec.xctemplate');
+cedar_iphone_file_template_dir = File.join(iphone_file_template_dir, 'Cedar spec.xctemplate');
+cedar_project_dir = File.join(project_templates_dir, 'Cedar App.xctemplate');
+cedar_iphone_project_dir = File.join(project_templates_dir, 'Cedar Touch App.xctemplate');
-cedar_osx_file_template_dir = File.join(osx_file_templates_dir, 'Cocoa Class', 'Cedar spec.pbfiletemplate');
-cedar_iphone_file_template_dir = File.join(iphone_file_templates_dir, 'Cocoa Touch Class', 'Cedar spec.pbfiletemplate');
-
-system(%Q[rm -rf "#{cedar_osx_project_template_dir}"])
+system(%Q[rm -rf "#{cedar_project_dir}"])
system(%Q[rm -rf "#{cedar_osx_file_template_dir}"])
-puts "Copying OS X project templates to #{cedar_osx_project_template_dir}"
-system(%Q[cp -R Project/osx "#{cedar_osx_project_template_dir}"])
+puts "Copying OS X project templates to #{cedar_project_dir}"
+system(%Q[cp -R Project/osx "#{cedar_project_dir}"])
puts "Copying OS X file templates to #{cedar_osx_file_template_dir}"
system(%Q[cp -R File/osx "#{cedar_osx_file_template_dir}"])
-system(%Q[rm -rf "#{cedar_iphone_project_template_dir}"])
+system(%Q[rm -rf "#{cedar_iphone_project_dir}"])
system(%Q[rm -rf "#{cedar_iphone_file_template_dir}"])
-puts "Copying iOS project templates to #{cedar_iphone_project_template_dir}"
-system(%Q[cp -R Project/iphone "#{cedar_iphone_project_template_dir}"])
-puts "Copying iOS file templates to #{cedar_iphone_file_template_dir}"
-system(%Q[cp -R File/iphone "#{cedar_iphone_file_template_dir}"])
+puts "Copying iPhone project templates to #{cedar_iphone_project_dir}"
+system(%Q[cp -R Project/osx "#{cedar_project_dir}"])
+puts "Copying iPhone file templates to #{cedar_iphone_file_template_dir}"
+system(%Q[cp -R File/osx "#{cedar_iphone_file_template_dir}"])
Please sign in to comment.
Something went wrong with that request. Please try again.