Avoid endless recursion when rbx is installed over existing one

When installing rbx over an existing location, the `gems/bin` directory
will already be a symlink to `bin/` and an attempt to recreate this will
end up in recursion that keeps growing a binstub file until the disk is full.
This commit is contained in:
Mislav Marohnić 2014-10-28 15:24:39 +01:00
parent 985200d4da
commit b3512f494e

View file

@ -644,7 +644,7 @@ fix_rbx_gem_binstubs() {
local bindir="${prefix}/bin"
local file binstub
# Symlink Rubinius' `gems/bin/` into `bin/`
if [ -d "$gemdir" ]; then
if [ -d "$gemdir" ] && [ ! -L "$gemdir" ]; then
for file in "$gemdir"/*; do
binstub="${bindir}/${file##*/}"
rm -f "$binstub"