rubygem/bin/ejson
raw| 1 | #!/usr/bin/env ruby |
| 2 | platform = `uname -sm` |
| 3 | |
| 4 | dir = case platform |
| 5 | when /^Darwin arm64/ ; "darwin-arm64" |
| 6 | when /^Darwin/ ; "darwin-amd64" |
| 7 | when /^Linux aarch64/ ; "linux-arm64" |
| 8 | when /^Linux.*64/ ; "linux-amd64" |
| 9 | when /^FreeBSD.*64/ ; "freebsd-amd64" |
| 10 | else |
| 11 | abort "Ejson is not supported on your platform." |
| 12 | end |
| 13 | |
| 14 | bindir = File.expand_path("../../build/#{dir}", __FILE__) |
| 15 | ENV['PATH'] = "#{bindir}:#{ENV['PATH']}" |
| 16 | exec "ejson", *ARGV |