summaryrefslogtreecommitdiffstats
path: root/rubygem-unicorn.spec
diff options
context:
space:
mode:
Diffstat (limited to 'rubygem-unicorn.spec')
-rw-r--r--rubygem-unicorn.spec13
1 files changed, 4 insertions, 9 deletions
diff --git a/rubygem-unicorn.spec b/rubygem-unicorn.spec
index 1b86377..f4f8e02 100644
--- a/rubygem-unicorn.spec
+++ b/rubygem-unicorn.spec
@@ -59,15 +59,10 @@ gem unpack %{SOURCE0}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
# Fix wrong shebang
-%if 0%{?fedora} >= 18
-grep -rl /this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby \
- bin/unicorn | \
- xargs sed -i -e 's|/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby|/usr/bin/ruby|'
-
-grep -rl /this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby \
- bin/unicorn_rails | \
- xargs sed -i -e 's|/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby|/usr/bin/ruby|'
-%endif
+sed -i -e '/^#!\//, 1d' bin/unicorn
+sed -i -e '/^#!\//, 1d' bin/unicorn_rails
+sed -i -e '1i#!/usr/bin/ruby' bin/unicorn
+sed -i -e '1i#!/usr/bin/ruby' bin/unicorn_rails
# Require rubygems when running tests
sed -i "2irequire 'rubygems'" test/test_helper.rb