instance method
Gem::Installer#generate_bin_script
generate_bin_script(filename, bindir)
lib/rubygems/installer.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/installer.rb, line 497
def generate_bin_script(filename, bindir)
bin_script_path = File.join bindir, formatted_program_filename(filename)
Gem.open_file_with_lock(bin_script_path) do
require "fileutils"
FileUtils.rm_f bin_script_path # prior install may have been --no-wrappers
File.open(bin_script_path, "wb", 0o755) do |file|
file.write app_script_text(filename)
file.chmod(options[:prog_mode] || 0o755)
end
end
verbose bin_script_path
generate_windows_script filename, bindir
end
Creates the scripts to run the applications in the gem.
See also
#gem_dir
#generate_bin_symlink
#gemdeps_load
#generate_windows_script
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0