-
Notifications
You must be signed in to change notification settings - Fork 4
/
bootstrap.sh
54 lines (45 loc) · 1.32 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# print start time
echo "DATE ||| $(date)"
# Variables
RDEVEL='R-devel_2015-12-02_r69719.tar.gz'
CRANURL='https://cran.r-project.org/src/base-prerelease/'
# Add CRAN mirror to apt-get sources
add-apt-repository "deb https://cran.rstudio.com/bin/linux/ubuntu trusty/"
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
# Swap out default Ubuntu mirror for a hopefully faster one
sed -i.bak 's/archive.ubuntu.com/mirrors.rit.edu/' /etc/apt/sources.list
# install LaTeX and some R dependencies
apt-get update && apt-get install --assume-yes --no-install-recommends \
apache2 \
cabal-install \
ca-certificates \
ccache \
ghc \
git \
libcurl4-openssl-dev \
libmysqlclient-dev \
libpq-dev \
libssl-dev \
libx11-dev \
libxml2-dev \
mysql-client \
subversion \
texlive-full \
wget
# Get dependencies to build r from source
apt-get build-dep --assume-yes r-base
# Install pandoc from source
cabal update
cabal install pandoc
# Build R from tar source
wget "$CRANURL$RDEVEL" && \
tar -zxvf $RDEVEL && \
cd R-devel && \
./configure --enable-R-shlib && \
make && \
make install
# Install granovaGG's dependencies
R --vanilla -f install_granovaGG_from_source.R
# Check package
R CMD build /vagrant && \
R CMD check --as-cran /vagrant/granovaGG_1.4.0.tar.gz