/
install
executable file
·139 lines (121 loc) · 4.07 KB
/
install
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/bash
## ========================================================
## FoldWatcher
## ---------------------
## Coded by Dr.K@meleon <drkameleon@hotmail.com>
##
## homepage : http:##kameleon-nest.blogspot.com
## http:##sourceforge.net/projects/foldwatcher/
## ============================
## Filename : install
## Last Update : 18/05/2008
##
## -----------------------------------------------------------------
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http:##www.gnu.org/licenses/>.
##
## Copyright (C) 2008 by Dr.K@meleon
## ========================================================
##################
## Functions
##################
AskForChoice()
{
local answerOK
answerOK="false"
while [ "$answerOK" = "false" ]
do
read Answer
if [ "$tr_OK" = "true" ] ;
then
Answer=$(echo $(echo "$Answer" | tr A-Z a-z))
fi
if [ "$Answer" = "yes" -o "$Answer" = "y" -o "$Answer" = "no" -o "$Answer" = "n" ];
then
answerOK="true"
if [ "$Answer" = "yes" -o "$Answer" = "y" ];
then
Answer="true"
else
Answer="false"
fi
else
echo '** You must enter a valid choice - either y/yes or n/no...'
echo ''
fi
done
}
######################
## Main procedure
######################
clear
echo '||============================================================||'
echo '|| ||'
echo '|| FoldWatcher ||'
echo '|| ------------------------- ||'
echo '|| An integrated monitoring environment for Folding@Home ||'
echo '|| designed for Linux and *nix Systems. ||'
echo '|| ||'
echo '|| Coded by Dr.K@meleon <drkameleon@hotmail.com> ||'
echo '||============================================================||'
echo ''
echo ''
echo '=== Installation ======='
echo ''
echo '>> Creating directories...'
rm -rf ~/.foldwatcher
mkdir ~/.foldwatcher
echo '>> Copying files...'
sudo cp -f bin/foldwatcher /usr/sbin
cp -f ui/logo/greenCube.png ~/.foldwatcher
cp -f tools/xyz2pdb ~/.foldwatcher
cp -f tools/wus_list.dat ~/.foldwatcher
echo '>> Creating desktop launcher...'
cp -f tools/FoldWatcher.desktop ~/Desktop
sudo chown $USER ~/Desktop/FoldWatcher.desktop
echo Icon=/home/$USER/.foldwatcher/greenCube.png >> ~/Desktop/FoldWatcher.desktop
echo '>> Do you want to install Folding@Home, using the "finstall" script? [y/n]'
AskForChoice
if [ "$Answer" = "true" ];
then
echo ''
echo '>> If you have an amd64 machine, you may install an SMP client. Do you want to proceed? [y/n]'
AskForChoice
if [ "$Answer" = "false" ];
then
echo ''
echo '>> Executing the "finstall" script...'
sudo chmod +x finstall
./finstall
else
echo ''
echo '>> Executing the "finstall" script with the "smp" directive...'
sudo chmod +x finstall
./finstall smp
fi
fi
echo ''
echo ''
echo '!! Installation was SUCCESSFULLY completed !!'
echo ''
echo '|| You are now free to enjoy Folding@Home through FoldWatcher!'
echo '|| -----------------------'
echo '|| For any inconvenience of this software you are kindly requested to'
echo '|| contact the author and report any possible bugs:'
echo '||'
echo '|| Dr.K@meleon <drkameleon@hotmail.com>'
echo '||'
echo ''
#############################################################
## This is the end, my only friend the end, etc, etc....
#############################################################