Skip to content

Instantly share code, notes, and snippets.

@timmow
Created February 11, 2013 13:06
Show Gist options
  • Select an option

  • Save timmow/4754314 to your computer and use it in GitHub Desktop.

Select an option

Save timmow/4754314 to your computer and use it in GitHub Desktop.
Enable symlinking of an executable, into a systemwide bin directory if you want to manage things without rubygems
#!/bin/env ruby
if File.symlink?( __FILE__)
dir = File.dirname(File.readlink(__FILE__))
$:.push( dir + '/lib')
Dir.chdir(dir)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment