Posted By

nflamel on 02/23/10


Tagged

rails script ruby shebang


Versions (?)

Smart shebang for script/runner


 / Published in: Rails
 

URL: http://bob.zoller.us/post/43855416/script-runner-script-that-doesnt-require-an-absolute

  1. #!/usr/bin/env ruby
  2. unless $0 =~ /runner/
  3. system("#{File.dirname(__FILE__)}/runner", __FILE__)
  4. exit 0
  5. end
  6.  
  7. puts 'your code goes here'

Report this snippet  

You need to login to post a comment.