Commit a4c3dbc5 by Mislav Marohnić

Avoid sed with extended regexp

Seems like sed 4.1.5 on RHEL 5.3 doesn't support `-E`, and sed on OS X doesn't
support `-r` to activate the extended regexp mode. Best to avoid extended regexp
altogether for compatibility.

Fixes #495
parent f44d7ba8
...@@ -592,7 +592,9 @@ fix_rbx_gem_binstubs() { ...@@ -592,7 +592,9 @@ fix_rbx_gem_binstubs() {
for file in "$gemdir"/*; do for file in "$gemdir"/*; do
binstub="${bindir}/${file##*/}" binstub="${bindir}/${file##*/}"
rm -f "$binstub" rm -f "$binstub"
sed -E "s:^#\!.+:#\!${bindir}/ruby:" < "$file" > "$binstub" { echo "#!${bindir}/ruby"
cat "$file"
} > "$binstub"
chmod +x "$binstub" chmod +x "$binstub"
done done
rm -rf "$gemdir" rm -rf "$gemdir"
......
...@@ -424,6 +424,7 @@ OUT ...@@ -424,6 +424,7 @@ OUT
run cat "${INSTALL_ROOT}/bin/rake" run cat "${INSTALL_ROOT}/bin/rake"
assert_output <<OUT assert_output <<OUT
#!${INSTALL_ROOT}/bin/ruby #!${INSTALL_ROOT}/bin/ruby
#!rbx
puts 'rake' puts 'rake'
OUT OUT
...@@ -431,6 +432,7 @@ OUT ...@@ -431,6 +432,7 @@ OUT
run cat "${INSTALL_ROOT}/bin/irb" run cat "${INSTALL_ROOT}/bin/irb"
assert_output <<OUT assert_output <<OUT
#!${INSTALL_ROOT}/bin/ruby #!${INSTALL_ROOT}/bin/ruby
#!rbx
print '>>' print '>>'
OUT OUT
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment