diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-03-29 12:03:59 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-03-29 12:03:59 +0200 |
commit | 5b5f068e2096ef86491887e773e2cf2349bb6344 (patch) | |
tree | 297c53e964e4d1061abcb1f55b64b9196f562887 /kernlab.sh | |
parent | 5f516e2297a014fbf59caee50a17b696d8c5ae06 (diff) |
Added Kernlab
Diffstat (limited to 'kernlab.sh')
-rwxr-xr-x | kernlab.sh | 39 |
1 files changed, 33 insertions, 6 deletions
@@ -1,8 +1,35 @@ -#!/bin/sh +#!/bin/bash +# +# Installs Kernlab. +# Author: Christoph Helma, Andreas Maunz. +# -echo "Installing kernlab" -. /etc/profile +if [ "$(id -u)" = "0" ]; then + echo "This script must be run as non-root." 1>&2 + exit 1 +fi + +# Utils +R="`which R`" +if [ ! -e "$R" ]; then + echo "'R' missing. Install 'R' first. Aborting..." + exit 1 +fi + +# Pkg +VER="0.9-11" + +DIR="`pwd`" +echo "This installs Kernlab." +echo "Press <Return> to continue, or <Ctrl+C> to abort." +read cd /tmp -wget http://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_0.9-11.tar.gz -R CMD INSTALL kernlab_0.9-11.tar.gz -cd - +if ! $WGET -O - "http://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_$VER.tar.gz">/dev/null 2>&1; then + echo "Download failed! Aborting..." + exit 1 +fi +R CMD INSTALL kernlab_$VER.tar.gz +cd "$DIR" + +echo +echo "Kernlab Installation finished." |