#!/bin/sh # Main Opentox-ruby install script # Author: Christoph Helma, Andreas Maunz if [ "$(id -u)" = "0" ]; then echo "This script must not be run as root" 1>&2 exit 1 fi echo echo "Warning! If all IST services are stoppped press return, else to stop installation." echo "Note: Your data will be backupped." read help_var echo mkdir -p $OT_PREFIX/tmp/ >/dev/null 2>&1 DATE=`date +_%Y%m%d_%H_%M` echo echo "Backups (if any)." echo backup_targets="$HOME/.opentox $HOME/opentox-ruby" for bt in $backup_targets; do if [ -f $bt ]; then mv -v --backup=numbered $bt $bt$DATE elif [ -d $bt ]; then mv -v --backup=numbered -T $bt $bt$DATE fi done LOG="$OT_PREFIX/tmp/`basename $0`-log.txt" . "./utils.sh" echo echo "Opentox-ruby installation." echo "You may need to give root password for some privileged actions right now and later:" echo cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" echo "Cleaning up $OT_PREFIX/tmp files." rm -rf $OT_PREFIX/tmp/openbabel* $OT_PREFIX/tmp/kernlab* $OT_PREFIX/tmp/ruby* . "./base-install.sh" . "./openbabel.sh" echo echo "Installation finished and system configured." echo "Destination: '$OT_PREFIX'" echo "IMPORTANT: Include '$OT_UI_CONF' in your shell or system startup to have the system automatically configured." echo