blob: c9a9ddb1646d94e6cd18b8dd2028cf26ccccc5fb (
plain)
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
55
|
#!/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 "OpenTox Ruby"
echo "Hit <Return> If all services are stoppped, else hit <Ctrl+C>."
read delete_me
echo "Note: CONFIG (~/.opentox) will be backupped."
mkdir -p $OT_PREFIX/tmp/ >/dev/null 2>&1
DATE=`date +_%Y%m%d_%H_%M`
echo "Backups (if any):"
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
echo "Backup finished."
. ./utils.sh
LOG="$OT_PREFIX/tmp/`basename $0`.log"
echo
echo "Welcome to base installation for OpenTox compatible services on Ruby and Debian."
echo "IMPORTANT: Hit <Ctrl+C> to adjust config.sh first (<Return> to continue)."
read delete_me
echo
echo -n "We need to install some packages. "
sudo echo -n ""
rm -rf $OT_PREFIX/tmp/openbabel* $OT_PREFIX/tmp/ruby*
cmd="mkdir -p $OT_PREFIX/install && cp utils.sh $OT_PREFIX/install" && run_cmd "$cmd" "Install utils.sh to OT_PREFIX"
cmd="mkdir -p $HOME/.opentox/config/install && cp config.sh $HOME/.opentox/config/install" && run_cmd "$cmd" "Install config.sh to CONFIG (~/.opentox)"
. ./base-install.sh
echo
echo "Installation finished."
echo "Destination (OT_PREFIX): '$OT_PREFIX'"
echo
echo "IMPORTANT: How to configure your system:"
echo "IMPORTANT: a) Include '$OT_UI_CONF' in shell startup (e.g. ~/.bashrc)."
echo "IMPORTANT: b) Manually source '$OT_UI_CONF' every time."
echo "IMPORTANT: The command in both cases: '. $OT_UI_CONF'"
echo "IMPORTANT: NOW would be the best time to configure!"
echo
echo "Thank you for your attention."
echo
|