summaryrefslogtreecommitdiffstats
path: root/rubygem-unicorn.spec
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2013-11-24 23:08:35 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2013-11-25 16:34:56 -0700
commit175465d8617e989bc832f30bb846b15b228bc8a3 (patch)
tree21754be72c105a89952f6ecd124ac4bb0e399d93 /rubygem-unicorn.spec
parent50de234c925ef797c15aa2633a843d87471f1238 (diff)
downloadrubygem-unicorn-175465d8617e989bc832f30bb846b15b228bc8a3.tar.gz
rubygem-unicorn-175465d8617e989bc832f30bb846b15b228bc8a3.tar.xz
rubygem-unicorn-175465d8617e989bc832f30bb846b15b228bc8a3.zip
use simpler sed commands to fix shebang
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