6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/bpm/libgems_ext/installer.rb', line 6
def app_script_text(bin_file_name)
"\#{shebang bin_file_name}\n#\n# This file was generated by BPM.\n#\n# The application '\#{@spec.name}' is installed as part of an bpkg, and\n# this file is here to facilitate running it.\n#\n\nversion = \"\#{LibGems::Requirement.default}\"\n\nif ARGV.first =~ /^_(.*)_$/ and LibGems::Version.correct? $1 then\n version = $1\n ARGV.shift\nend\n\ngem '\#{@spec.name}', version\n\npath = LibGems.bin_path('\#{@spec.name}', '\#{bin_file_name}', version)\nshebang = File.open(path){|f| f.readline }\n\nif shebang =~ /^\\#\\!.*ruby/\n load path\nelse\n exec path, *ARGV\nend\n"
end
|