public
Description: Code as Art, Art as Code. Processing and Ruby are meant for each other.
Homepage: http://github.com/jashkenas/ruby-processing/wikis
Clone URL: git://github.com/jashkenas/ruby-processing.git
Search Repo:
ruby-processing / script / open.rb
100755 17 lines (14 sloc) 0.378 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby
 
# For all you bash-less folks.
# This script lets you open up Ruby-Processing sketches
# without having to install JRuby.
 
path = ARGV[0]
unless path
  puts "Usage: script/open path/to/my_sketch.rb"
  exit
end
unless File.exists? path
  puts "Couldn't find: #{path}"
  exit
end
 
puts `java -cp "script/base_files/jruby-complete.jar" org.jruby.Main #{path}`