From 01570d16560a8d7e2952c3aa80ceac09a313fb64 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Tue, 6 Mar 2012 14:58:45 +0100 Subject: [PATCH] fix a bug in the installer that prevented to create empty directories, 0.54 --- NEWS | 5 +++++ Rakefile | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 37e1c20b..ef128a21 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ += RubyMotion 0.54 = + + * Fixed a bug in the installer where empty resources directories in some + samples would not be created. + = RubyMotion 0.53 = * Added `motion support', which allows developers to submit support tickets. diff --git a/Rakefile b/Rakefile index 2ebfa752..b122e06c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,5 @@ PLATFORMS_DIR = '/Applications/Xcode.app/Contents/Developer/Platforms' -PROJECT_VERSION = '0.53' +PROJECT_VERSION = '0.54' sim_sdks = Dir.glob(File.join(PLATFORMS_DIR, 'iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk')).map do |path| File.basename(path).scan(/^iPhoneSimulator(.+)\.sdk$/)[0][0] @@ -81,7 +81,6 @@ task :install do #data.concat(Dir.glob('./doc/docset/**/*')) data.concat(Dir.glob('./sample/**/*').reject { |path| path =~ /build/ }) data.reject! { |path| /^\./.match(File.basename(path)) } - data.reject! { |path| File.directory?(path) } motiondir = '/Library/Motion' destdir = (ENV['DESTDIR'] || '/') @@ -90,8 +89,12 @@ task :install do pathdir = File.join(destmotiondir, File.dirname(path)) mkdir_p pathdir unless File.exist?(pathdir) destpath = File.join(destmotiondir, path) - cp path, destpath - chmod mode, destpath + if File.directory?(path) + mkdir_p destpath + else + cp path, destpath + chmod mode, destpath + end destpath end