public
Description: Run rails applications reliably as runit services
Homepage: http://www.sanityinc.com/
Clone URL: git://github.com/purcell/rails-runit.git
Click here to lend your support to: rails-runit and make a donation at www.pledgie.com !
rails-runit / readlink_canonical
100755 14 lines (11 sloc) 0.228 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env ruby
ME = File.basename($0)
 
unless (filename = ARGV.first) && ARGV.size == 1
  abort "usage: #{ME} filename"
end
 
require 'pathname'
begin
  puts Pathname.new(filename).realpath
rescue
  abort "#{ME}: #{$!}"
end