set -e ## not sure how to override if [ -e ~/.R/Makevars ] then mv ~/.R/Makevars ~/.R/Makevars.ORIGINAL fi printenv R --version dir=`mktemp` rm ${dir} mkdir -p ${dir} cd ${dir} git clone --recursive https://github.com/rwdavies/STITCH.git cd STITCH ./scripts/install-dependencies.sh ./scripts/install-xz.sh mkdir -p ~/.R echo "CPPFLAGS += -I`pwd`/install/include" > ~/.R/Makevars echo "LDFLAGS += -L`pwd`/install/lib" >> ~/.R/Makevars export LD_LIBRARY_PATH=`pwd`/install/lib/:${LD_LIBRARY_PATH} printenv R CMD INSTALL ./releases/STITCH_1.5.3.tar.gz