Commit 85b64c4a by Phil Smith Committed by Mislav Marohnić

Fix JRuby install on systems with non-BSD `sed`

There doesn't seem to be a way to construct a sed invocation for
in-place editing that is compatible with both BSD and GNU sed.

http://stackoverflow.com/q/5694228/11687

Fixes #475
parent 578f0c5c
...@@ -519,7 +519,8 @@ install_jruby_launcher() { ...@@ -519,7 +519,8 @@ install_jruby_launcher() {
fix_jruby_shebangs() { fix_jruby_shebangs() {
for file in "${PREFIX_PATH}/bin"/*; do for file in "${PREFIX_PATH}/bin"/*; do
if [ "$(head -c 20 "$file")" = "#!/usr/bin/env jruby" ]; then if [ "$(head -c 20 "$file")" = "#!/usr/bin/env jruby" ]; then
sed -i '' -E "1s:.+:#\!${PREFIX_PATH}/bin/jruby:" "$file" sed -i.bak -E "1s:.+:#\!${PREFIX_PATH}/bin/jruby:" "$file"
rm "$file".bak
fi fi
done done
} }
......
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