117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# File 'lib/thin_service/command.rb', line 117
def validate_thin_service_exe
gem_root = File.join(File.dirname(__FILE__), "..", "..")
gem_executable = File.join(gem_root, "resource/thin_service_wrapper.exe")
bindir_executable = File.join(RbConfig::CONFIG['bindir'], '/thin_service_wrapper.exe')
unless File.exist?(bindir_executable)
STDERR.puts "** Copying native thin_service executable..."
FileUtils.cp gem_executable, bindir_executable rescue nil
end
unless FileUtils.compare_file(bindir_executable, gem_executable)
STDERR.puts "** Updating native thin_service executable..."
FileUtils.rm_f bindir_executable rescue nil
FileUtils.cp gem_executable, bindir_executable rescue nil
end
bindir_executable
end
|