Displaying 1 result from an estimated 1 matches for "new_hashbang".
2006 Apr 21
9
Capistrano, OS X
...different path to ruby (which would be practially all of them:-)
Here''s a fix. Add this "fix_hashbangs.rb" script to your script
directory.
Don''t forget to make it executable, and check it in to your Subversion
repository.
#!/usr/bin/env ruby
current_path = ARGV[0]
new_hashbang = ARGV[1]
f_names = %w(dispatch.cgi dispatch.rb dispatch.fcgi)
f_names.each do |name|
puts `ls -al "#{current_path}/public/#{name}" `
File.open("#{current_path}/public/#{name}", "r+") do |f|
f_contents = f.read
f_contents.gsub!(/^#!.+$/, new_hashbang)
f...