summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorist <ist@ISTdebian64.(none)>2012-08-03 11:51:43 +0200
committerist <ist@ISTdebian64.(none)>2012-08-03 11:51:43 +0200
commitb8c44f7ef95dcba6261376930fe1c55a53b178bc (patch)
treefc4922ddc4d48985b7b5660a6bfe86891fffad97
parent829d4145e413f75f7e1986d6091859c4b77de563 (diff)
Added package lists. Added service installer.
-rwxr-xr-x4store-install2
-rwxr-xr-xbase-install36
-rw-r--r--debian.list23
-rw-r--r--services.sh10
-rw-r--r--ubuntu.list23
-rwxr-xr-xutils.sh24
6 files changed, 89 insertions, 29 deletions
diff --git a/4store-install b/4store-install
index a00a07a..3a75faa 100755
--- a/4store-install
+++ b/4store-install
@@ -17,7 +17,7 @@ cd $OT_PREFIX/tmp/
([ -d $SELF ] && cd $SELF && cmd="$GIT pull" && run_cmd "$cmd" "Git pull") || (cmd="$GIT clone https://github.com/garlik/$SELF" && run_cmd "$cmd" "Git clone")
cd $SELF
cmd="./autogen.sh" && run_cmd "$cmd" "Autogen"
-export FST=$HOME/4S
+export FST=$OT_PREFIX/4S
cmd="./configure --prefix=$FST --exec-prefix=$FST --with-storage-path=$FST/var/lib --with-config-file=$FST/$SELF.conf -with-http-log=$FST/log" && run_cmd "$cmd" "Configure"
cmd="make" && run_cmd "$cmd" "Make"
cmd="make install" && run_cmd "$cmd" "Make Install"
diff --git a/base-install b/base-install
index 7ce7c70..0871bc4 100755
--- a/base-install
+++ b/base-install
@@ -15,42 +15,22 @@ DIR=`pwd`
[ "`id -u`" = "0" ] && echo "This script must not be run as root" 1>&2 && exit 1
check_utils "aptitude git apt-cache dpkg"
-# Pkgs
-packs="build-essential cmake libgsl0-dev libopenbabel4 libopenbabel-dev libtool openjdk-6-jdk r-base r-base-dev libpcre3-dev librasqal3-dev libtool libraptor1-dev libglib2.0-dev ncurses-dev libreadline-dev uuid-dev"
echo
echo "Base Packages:"
echo
echo "Updating index..."
sudo $APTITUDE update -y >/dev/null 2>&1
-pack_arr=$packs
-if [ -n "$pack_arr" ]; then
- echo
- echo "Checking availablity:"
- for p in $pack_arr; do
- if [ -n "`$APT_CACHE search $p`" ] ; then
- printf "%30s%50s\n" $p Y
- else
- printf "%30s%50s\n" $p N
- pack_fail="$pack_fail $p"
- fi
- done
-fi
-
-if [ -n "$pack_fail" ]; then
- echo
- echo "WARNING: At least one missing package has no suitable installation candidate."
- echo "Press <Ctrl+C> to abort (5 sec)."
- sleep 5
-fi
+DISTRIB_INFO=$(cat /proc/version)
-echo
-if [ -n "$pack_arr" ]; then
- echo
- echo "Installing packages"
- sudo $APTITUDE -y install $pack_arr
-fi
+case "$DISTRIB_INFO" in
+ *Debian*) echo "Debian found."; echo "$DIR/debian.list"; PACK_LIST="$DIR/debian.list";;
+ *Ubuntu*) PACK_LIST="ubuntu.list";;
+ *) PACK_LIST="debian.list";;
+esac
+sudo dpkg --set-selections < "$PACK_LIST"
+sudo apt-get -y -u dselect-upgrade
if [ ! -f $JAVA_CONF ]; then
diff --git a/debian.list b/debian.list
new file mode 100644
index 0000000..3a25164
--- /dev/null
+++ b/debian.list
@@ -0,0 +1,23 @@
+ld-essential install
+cmake install
+libgsl0-dev install
+libtool install
+openjdk-6-jdk install
+r-base install
+r-base-dev install
+libpcre3-dev install
+librasqal3-dev install
+libtool install
+libglib2.0-dev install
+ncurses-dev install
+libreadline-dev install
+uuid-dev install
+libraptor1-dev install
+libopenbabel4 install
+libopenbabel-dev install
+automake install
+libyaml-dev install
+libopenssl-ruby install
+libssl-dev install
+libxml2-dev install
+libssl-dev install
diff --git a/services.sh b/services.sh
new file mode 100644
index 0000000..c5bbeb6
--- /dev/null
+++ b/services.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+source config.sh
+source utils.sh
+LOG="$OT_PREFIX/tmp/service_install.log"
+DIR=`pwd`
+for SERVICE in opentox-client opentox-server dataset algorithm; do
+ install_ot_service
+done
+cd $DIR
diff --git a/ubuntu.list b/ubuntu.list
new file mode 100644
index 0000000..3a25164
--- /dev/null
+++ b/ubuntu.list
@@ -0,0 +1,23 @@
+ld-essential install
+cmake install
+libgsl0-dev install
+libtool install
+openjdk-6-jdk install
+r-base install
+r-base-dev install
+libpcre3-dev install
+librasqal3-dev install
+libtool install
+libglib2.0-dev install
+ncurses-dev install
+libreadline-dev install
+uuid-dev install
+libraptor1-dev install
+libopenbabel4 install
+libopenbabel-dev install
+automake install
+libyaml-dev install
+libopenssl-ruby install
+libssl-dev install
+libxml2-dev install
+libssl-dev install
diff --git a/utils.sh b/utils.sh
index d5bbe58..6d40b74 100755
--- a/utils.sh
+++ b/utils.sh
@@ -93,6 +93,30 @@ install_with_bundler() {
cmd="bundle install" && run_cmd "$cmd" "Install using bundler"
}
+# download opentox git repo
+ot_git_download(){
+ printf "\n%50s\n" "GIT DOWNLOAD"
+ check_utils "git"
+ cd $OT_PREFIX
+ cmd="git clone git@github.com:opentox/$SERVICE.git" && run_cmd "$cmd" "Downloading $SERVICE git repository"
+}
+
+# install opentox service
+install_ot_service(){
+ printf "\n%50s\n" "$SERVICE"
+ local DIR=`pwd`
+ cd $OT_PREFIX
+ ot_git_download
+ cd $SERVICE
+ git checkout development
+ case "$SERVICE" in
+ opentox-server) install_with_bundler;;
+ opentox-client) install_with_bundler;;
+ *) cd bin; for f in `ls`; do ./$f; done;;
+ esac
+ cd $DIR
+}
+
# emit notification if caller was the shell (the user), see http://goo.gl/grCOk
notify() {
echo