File: generate.rb

package info (click to toggle)
ruby-amq-protocol 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 392 kB
  • sloc: ruby: 4,212; python: 247; makefile: 2
file content (18 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env ruby
# encoding: utf-8

def sh(*args)
  system(*args)
end

spec = "vendor/rabbitmq-codegen/amqp-rabbitmq-0.9.1.json"
unless File.exist?(spec)
  sh "git submodule update --init"
end

path = "lib/amq/protocol/client.rb"
sh "./codegen.py client #{spec} #{path}"
if File.file?(path)
  sh "./post-processing.rb #{path}"
  sh "ruby -c #{path}"
end