Skip to content

Commit

Permalink
Use single quotes and string templates where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
dcermak committed Jun 20, 2023
1 parent adf719b commit e23d592
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/gem2rpm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# -*- ruby -*-

$LOAD_PATH.push(File.expand_path(File.dirname(__FILE__) + "/../lib"))
$LOAD_PATH.push(File.expand_path("#{File.dirname(__FILE__)}/../lib"))

require 'gem2rpm'
require 'fileutils'
Expand Down Expand Up @@ -97,7 +97,7 @@ Gem2Rpm.convert(gemfile, template, output_spec, options[:nongem], options[:local

# Save or print a specfile.
if options[:output_file]
File.open(options[:output_file], "w") do |f|
File.open(options[:output_file], 'w') do |f|
f.puts(output_spec.string)
end
else
Expand All @@ -110,15 +110,15 @@ if options[:srpm]
Dir.mktmpdir "gem2rpm-#{gemname}-" do |srpmdir|
specfile = File.join(srpmdir, "rubygem-#{gemname}.spec")

File.open(specfile, "w") do |f|
File.open(specfile, 'w') do |f|
f.puts(output_spec.string)
end

FileUtils.copy(gemfile, srpmdir)

command =
"rpmbuild -bs --nodeps " +
"--define '_sourcedir #{srpmdir}' " +
'rpmbuild -bs --nodeps ' \
"--define '_sourcedir #{srpmdir}' " \
"--define '_srcrpmdir #{out_dir}' " +
specfile

Expand Down

0 comments on commit e23d592

Please sign in to comment.