I believe I've seen some examples of this in projects I use but I can not find them at this time. What I have is a ruby project with a structure such as this:
~/projects/ruby/foo/bin
bar.rb
bar.cmd
bar.sh
My application sits entirely in bar.rb. I have logic in all of my file path logic to handle symbolic links, so that a symlink of ~/bin/bar will work correctly.
The issue I have is that I want this file to work the same on both windows and linux, therefore I took a shebang line out of bar.rb and would like to move it to bar.sh
#!/usr/bin/env ruby
But now I have to forward all os args from this bash file to the ruby file so that it will work correctly. I have not had much success on the windows cmd file either.
Is there a simpler way to achieve cross platform shebang behavior that works with os arguments?
.shand.cmdentry points for your application? Do those scripts do any work? If not it would probably be better to just avoid them entirely. - Etan Reisner%PATH%should be enough I think). - Etan Reisner