def generate_bin_script(filename, bindir)
    bin_script_path = File.join bindir, formatted_program_filename(filename)

    FileUtils.rm_f bin_script_path # prior install may have been --no-wrappers

    File.open bin_script_path, 'wb', 0755 do |file|
      file.print app_script_text(filename)
    end

    say bin_script_path if Gem.configuration.really_verbose

    generate_windows_script filename, bindir
  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