mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-06 22:39:46 +08:00
fix a bug in the installer that prevented to create empty directories, 0.54
This commit is contained in:
5
NEWS
5
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.
|
||||
|
||||
11
Rakefile
11
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user