mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-03-29 22:43:28 +08:00
21 lines
793 B
Ruby
Executable File
21 lines
793 B
Ruby
Executable File
#!/usr/bin/ruby
|
|
# Copyright (C) 2012, HipByte SPRL. All Rights Reserved.
|
|
#
|
|
# This file is subject to the terms and conditions of the End User License
|
|
# Agreement accompanying the package this file is a part of.
|
|
|
|
require 'fileutils'
|
|
|
|
relative_libdir = File.expand_path(File.join(File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__), '../lib'))
|
|
$motion_libdir = File.exist?(File.join(relative_libdir, 'motion')) ? relative_libdir : '/Library/RubyMotion/lib'
|
|
$:.unshift($motion_libdir)
|
|
|
|
require 'motion/project/command'
|
|
|
|
command_paths = [File.join($motion_libdir, 'motion/project/command'), File.join(ENV['HOME'], 'Library/RubyMotion/command')]
|
|
command_paths.each do |path|
|
|
Dir.glob(File.join(path, '*.rb')).each { |x| require x }
|
|
end
|
|
|
|
Motion::Project::Command.main(ARGV)
|