Skip to content

Commit

Permalink
Escape percents in filenames in %install section
Browse files Browse the repository at this point in the history
  • Loading branch information
jwittkoski committed Sep 25, 2012
1 parent e0472f3 commit c7bb505
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/rpm.erb
Expand Up @@ -69,9 +69,9 @@ Obsoletes: <%= repl %>


%install %install
<% files.each do |path| -%> <% files.each do |path| -%>
<% source = Shellwords.shellescape(File.join(staging_path, path)) -%> <% source = Shellwords.shellescape(File.join(staging_path, path)).gsub("%", "%%") -%>
<% # Copy to the build_path/BUILD/ to make rpmbuild happy -%> <% # Copy to the build_path/BUILD/ to make rpmbuild happy -%>
<% target = Shellwords.shellescape(File.join(build_path, build_sub_dir, path)) -%> <% target = Shellwords.shellescape(File.join(build_path, build_sub_dir, path)).gsub("%", "%%") -%>
<% dir = File.dirname(target) %> <% dir = File.dirname(target) %>
mkdir -p <%= dir %> mkdir -p <%= dir %>
if [ -f <%= source %> ] || [ -h <%= source %> ] ; then if [ -f <%= source %> ] || [ -h <%= source %> ] ; then
Expand Down

0 comments on commit c7bb505

Please sign in to comment.