ruby-win32/lib/ruby/site_ruby/1.8/rubygems/installer.rb
def generate_bin_script(filename, bindir)
    bin_script_path = File.join bindir, formatted_program_filename(filename)

    exec_path = File.join @gem_dir, @spec.bindir, filename

    # HACK some gems don't have #! in their executables, restore 2008/06
    #if File.read(exec_path, 2) == '#!' then
      File.open bin_script_path, 'w', 0755 do |file|
        file.print app_script_text(filename)
      end

      say bin_script_path if Gem.configuration.really_verbose

      generate_windows_script bindir, filename
    #else
    #  FileUtils.rm_f bin_script_path
    #  FileUtils.cp exec_path, bin_script_path,
    #               :verbose => Gem.configuration.really_verbose
    #end
  end
##
# Creates the scripts to run the applications in the gem.
#--
# The Windows script is generated in addition to the regular one due to a
# bug or misfeature in the Windows shell's pipe.  See
# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/193379
#
Creates the scripts to run the applications in the gem.
The Windows script is generated in addition to the regular one due to a
bug or misfeature in the Windows shell's pipe.
Creates the scripts to run the applications in the gem . The Windows script is generated in addition to the regular one due to a bug or misfeature in the Windows shell ' s pipe .
def generate_bin_script(filename, bindir)
    bin_script_path = File.join bindir, formatted_program_filename(filename)
    exec_path = File.join @gem_dir, @spec.bindir, filename
      File.open bin_script_path, 'w', 0755 do |file|
        file.print app_script_text(filename)
      end
      say bin_script_path if Gem.configuration.really_verbose
      generate_windows_script bindir, filename
  end
def generate_bin_script ( filename , bindir ) bin_script_path = File . join bindir , formatted_program_filename ( filename ) exec_path = File . join @gem_dir , @spec . bindir , filename File . open bin_script_path , 'w' , 0755 do | file | file . print app_script_text ( filename ) end say bin_script_path if Gem . configuration . really_verbose generate_windows_script bindir , filename end
Creates the scripts to run the applications in the gem.
Creates the scripts to run the applications in the gem .
# HACK some gems don't have #! in their executables, restore 2008/06 #if File.read(exec_path, 2) == '#!' then #else #  FileUtils.rm_f bin_script_path #  FileUtils.cp exec_path, bin_script_path, #               :verbose => Gem.configuration.really_verbose #end
filename
bindir