#!/bin/sh

if ! [ -d /proc/curproc ]; then
  echo "RStudio needs /proc to be mounted as procfs" >&2
  exit 1
fi

# workaround for the problem that RStudio passes /lib with LD_LIBRARY_PATH that causes the /lib/libgcc_s.so.1 conflict with gcc
LD_PRELOAD=/usr/local/lib/gcc13/libgcc_s.so JAVA_HOME=/usr/local/openjdk11 /usr/local/lib/rstudio/bin/rstudio "$@"
