Skip to content

Instantly share code, notes, and snippets.

@philopon
Last active December 29, 2015 03:19
Show Gist options
  • Save philopon/7606859 to your computer and use it in GitHub Desktop.
Save philopon/7606859 to your computer and use it in GitHub Desktop.
#!/bin/bash
# $ uname -a
# Darwin MBA2011Mid.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
# インストール先
SRC=$HOME/src
BOOST=boost_1_50_0
RSTUDIO=rstudio-rstudio-ca19c52
RSTUDIO_ARCHIVE=$SRCDIR/rstudio-rstudio-v0.97.551-0-gca19c52.tar.gz
BOOST_ARCHIVE=$SRCDIR/$BOOST.tar.bz2
DEST=$HOME/rstudio-ca19c52
# 解凍
cd $SRC
tar xvf $BOOST_ARCHIVE
tar xvf $RSTUDIO_ARCHIVE
# Boostインストール
cd $SRC/$BOOST
echo "using darwin : std03 : clang++ : <cxxflags>-std=c++03 <cxxflags>-stdlib=libstdc++ <linkflags>-stdlib=libstdc++ ;" >> tools/build/v2/user-config.jam
./bootstrap
./b2 --prefix=$DEST toolset=darwin-std03 variant=release threading=multi link=static install
# RStudio
cd $SRC/$RSTUDIO/dependencies/common
./install-dictionaries
./install-gwt
./install-mathjax
cd $SRC/$RSTUDIO
mkdir build
cd build
cmake -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$DEST \
-DCMAKE_CXX_FLAGS="-std=c++03 -stdlib=libstdc++" \
-DBOOST_ROOT=$DEST -GNinja ..
ninja
ninja install
sudo cp /etc/pam.d/ftpd /etc/pam.d/rstudio
cd $DEST
./bin/rserver
open http://localhost:8787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment