# Copied and minimized from https://github.com/rubymotion/Joybox # View JoyBox at: http://joybox.io require 'fileutils' source_directory = File.expand_path('../../lib/motion/gem', __FILE__) source_file = File.join(source_directory, 'gem_command.rb') motion_directory = File.expand_path('~/Library/RubyMotion') command_directory = File.join(motion_directory, 'command') destination_file = File.join(command_directory, File.basename(source_file)) FileUtils.rm_f File.join(command_directory, 'gem_command.rb') FileUtils.mkdir_p(command_directory) unless File.directory?(command_directory) FileUtils.rm_f destination_file FileUtils.ln_s source_file, destination_file require 'mkmf' create_makefile ''