Sha256: 10a6099ebe7a1e37ebda9a8503d732437d3fa27f182326b5519b9fddc74dd437
Contents?: true
Size: 1017 Bytes
Versions: 2
Compression:
Stored size: 1017 Bytes
Contents
#!/usr/bin/env ruby # vim:set filetype=ruby: require "pathname" require "optparse" options = { :interactive => false } parser = OptionParser.new do |opts| opts.banner = "Usage: akephalos [--interactive] | [--server] <socket_file>" opts.on("-s", "--server", "Run in server mode (default)") opts.on("-i", "--interactive", "Run in interactive mode") { options[:interactive] = true } opts.on_tail("-h", "--help", "Show this message") { puts opts; exit } end parser.parse! root = Pathname(__FILE__).expand_path.dirname.parent lib = root + 'lib' jruby = root + "src/jruby-complete-1.5.0.jar" jruby_cmd = %Q(java -Xmx2048M -jar #{jruby} -I#{lib}) if options[:interactive] $:.unshift(lib) require 'rubygems' require 'akephalos' require 'akephalos/console' Akephalos::Console.start else unless socket_file = ARGV[0] puts parser.help exit end server = 'akephalos/server' command = %Q(#{jruby_cmd} -r#{server} -e 'Akephalos::Server.start!(%s)') exec command % socket_file.inspect end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
akephalos-0.0.5 | bin/akephalos |
akephalos-0.0.4 | bin/akephalos |