Commit b3512f49 authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

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.
parent 985200d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"