Commit 05a45b5900e788a5e9000587c3a44a2a488439de
1 parent
7c52739538
Exists in
master
update install script
Showing 1 changed file with 6 additions and 4 deletions Inline Diff
install.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | #-------------------# | 3 | #-------------------# |
4 | # OTMEDIA LIA # | 4 | # OTMEDIA LIA # |
5 | # Install script # | 5 | # Install script # |
6 | # version : 1.0.0 # | 6 | # version : 1.0.0 # |
7 | #-------------------# | 7 | #-------------------# |
8 | 8 | ||
9 | username=${LOGNAME} | ||
10 | |||
9 | # Color variables | 11 | # Color variables |
10 | txtgrn=$(tput setaf 2) # Green | 12 | txtgrn=$(tput setaf 2) # Green |
11 | txtylw=$(tput setaf 3) # Yellow | 13 | txtylw=$(tput setaf 3) # Yellow |
12 | txtblu=$(tput setaf 4) # Blue | 14 | txtblu=$(tput setaf 4) # Blue |
13 | txtpur=$(tput setaf 5) # Purple | 15 | txtpur=$(tput setaf 5) # Purple |
14 | txtcyn=$(tput setaf 6) # Cyan | 16 | txtcyn=$(tput setaf 6) # Cyan |
15 | txtwht=$(tput setaf 7) # White | 17 | txtwht=$(tput setaf 7) # White |
16 | txtrst=$(tput sgr0) # Text reset. | 18 | txtrst=$(tput sgr0) # Text reset. |
17 | #/color | 19 | #/color |
18 | 20 | ||
19 | # | 21 | # |
20 | ### Global Variables | 22 | ### Global Variables |
21 | # | 23 | # |
22 | PWD=$(pwd) | 24 | PWD=$(pwd) |
23 | OTMEDIA_HOME=$PWD | 25 | OTMEDIA_HOME=$PWD |
24 | test=$(arch) | 26 | test=$(arch) |
25 | if [ "$test" == "x86_64" ]; then ARCH=".64"; else ARCH=""; fi | 27 | if [ "$test" == "x86_64" ]; then ARCH=".64"; else ARCH=""; fi |
26 | #/Global | 28 | #/Global |
27 | 29 | ||
28 | 30 | ||
29 | # | 31 | # |
30 | # Put to 0 to disable dependencies of a pass | 32 | # Put to 0 to disable dependencies of a pass |
31 | # and 1 to enable | 33 | # and 1 to enable |
32 | # | 34 | # |
33 | PASS1=1 # First Pass | 35 | PASS1=1 # First Pass |
34 | PASS2=1 # Second and Third Pass | 36 | PASS2=1 # Second and Third Pass |
35 | CONFPASS=1 # Confidence Pass | 37 | CONFPASS=1 # Confidence Pass |
36 | EXPLOITCONFPASS=1 # SOLR query and trigg | 38 | EXPLOITCONFPASS=1 # SOLR query and trigg |
37 | 39 | ||
38 | echo -e "\nWill do install for :" | 40 | echo -e "\nWill do install for :" |
39 | if [ $PASS1 -eq 1 ];then echo "- Pass 1";fi | 41 | if [ $PASS1 -eq 1 ];then echo "- Pass 1";fi |
40 | if [ $PASS2 -eq 1 ];then echo "- Pass 2";fi | 42 | if [ $PASS2 -eq 1 ];then echo "- Pass 2";fi |
41 | if [ $CONFPASS -eq 1 ];then echo "- Confidence Pass";fi | 43 | if [ $CONFPASS -eq 1 ];then echo "- Confidence Pass";fi |
42 | if [ $EXPLOITCONFPASS -eq 1 ];then echo "- Exploit Confidence Pass";fi | 44 | if [ $EXPLOITCONFPASS -eq 1 ];then echo "- Exploit Confidence Pass";fi |
43 | 45 | ||
44 | # | 46 | # |
45 | ### CHECK Dependencies ### | 47 | ### CHECK Dependencies ### |
46 | # | 48 | # |
47 | echo -e "\n\t${txtblu}Check Dependencies${txtrst}\n" | 49 | echo -e "\n\t${txtblu}Check Dependencies${txtrst}\n" |
48 | 50 | ||
49 | ## make | 51 | ## make |
50 | test=$(whereis make) | 52 | test=$(whereis make) |
51 | if [ "$test" == "make:" ] | 53 | if [ "$test" == "make:" ] |
52 | then | 54 | then |
53 | echo -e "${txtpur}ERROR${txtrst} make not found\n You have to install make\n sudo apt-get install make" | 55 | echo -e "${txtpur}ERROR${txtrst} make not found\n You have to install make\n sudo apt-get install make" |
54 | exit 1; | 56 | exit 1; |
55 | fi | 57 | fi |
56 | echo -e "make \t ${txtgrn}OK${txtrst}" | 58 | echo -e "make \t ${txtgrn}OK${txtrst}" |
57 | 59 | ||
58 | ## CC | 60 | ## CC |
59 | test=$(whereis cc) | 61 | test=$(whereis cc) |
60 | if [ "$test" == "cc:" ] | 62 | if [ "$test" == "cc:" ] |
61 | then | 63 | then |
62 | echo -e "${txtpur}ERROR${txtrst} cc not found\n You have to install cc\n sudo apt-get install gcc" | 64 | echo -e "${txtpur}ERROR${txtrst} cc not found\n You have to install cc\n sudo apt-get install gcc" |
63 | exit 1; | 65 | exit 1; |
64 | fi | 66 | fi |
65 | echo -e "cc \t ${txtgrn}OK${txtrst}" | 67 | echo -e "cc \t ${txtgrn}OK${txtrst}" |
66 | 68 | ||
67 | ## AVCONV | 69 | ## AVCONV |
68 | test=$(whereis avconv) | 70 | test=$(whereis avconv) |
69 | if [ "$test" == "avconv:" ] | 71 | if [ "$test" == "avconv:" ] |
70 | then | 72 | then |
71 | echo -e "${txtpur}ERROR${txtrst} avconv not found\n You have to install avconv\n sudo apt-get install libav-tools" | 73 | echo -e "${txtpur}ERROR${txtrst} avconv not found\n You have to install avconv\n sudo apt-get install libav-tools" |
72 | exit 1; | 74 | exit 1; |
73 | fi | 75 | fi |
74 | echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}" | 76 | echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}" |
75 | 77 | ||
76 | ## JAVA | 78 | ## JAVA |
77 | test=$(whereis java) | 79 | test=$(whereis java) |
78 | if [ "$test" == "java:" ] | 80 | if [ "$test" == "java:" ] |
79 | then | 81 | then |
80 | echo -e "${txtpur}ERROR${txtrst} java not found\n You have to install java JRE\n sudo apt-get install openjdk-7-jre" | 82 | echo -e "${txtpur}ERROR${txtrst} java not found\n You have to install java JRE\n sudo apt-get install openjdk-7-jre" |
81 | exit 1; | 83 | exit 1; |
82 | fi | 84 | fi |
83 | echo -e "Java : JRE \t ${txtgrn}OK${txtrst}" | 85 | echo -e "Java : JRE \t ${txtgrn}OK${txtrst}" |
84 | test=$(whereis javac) | 86 | test=$(whereis javac) |
85 | if [ "$test" == "javac:" ] | 87 | if [ "$test" == "javac:" ] |
86 | then | 88 | then |
87 | echo -e "${txtpur}ERROR${txtrst} javac not found\n You have to install java JDK\n sudo apt-get install openjdk-7-jdk" | 89 | echo -e "${txtpur}ERROR${txtrst} javac not found\n You have to install java JDK\n sudo apt-get install openjdk-7-jdk" |
88 | exit 1; | 90 | exit 1; |
89 | fi | 91 | fi |
90 | echo -e "Java : JDK \t ${txtgrn}OK${txtrst}" | 92 | echo -e "Java : JDK \t ${txtgrn}OK${txtrst}" |
91 | 93 | ||
92 | if [ $EXPLOITCONFPASS -eq 1 ] | 94 | if [ $EXPLOITCONFPASS -eq 1 ] |
93 | then | 95 | then |
94 | ## Python | 96 | ## Python |
95 | test=$(whereis python) | 97 | test=$(whereis python) |
96 | if [ "$test" == "python:" ] | 98 | if [ "$test" == "python:" ] |
97 | then | 99 | then |
98 | echo -e "${txtpur}ERROR${txtrst} python not found\n You have to install python\n sudo apt-get install python" | 100 | echo -e "${txtpur}ERROR${txtrst} python not found\n You have to install python\n sudo apt-get install python" |
99 | exit 1; | 101 | exit 1; |
100 | fi | 102 | fi |
101 | echo -e "python : \t ${txtgrn}OK${txtrst}" | 103 | echo -e "python : \t ${txtgrn}OK${txtrst}" |
102 | 104 | ||
103 | ## csh shell | 105 | ## csh shell |
104 | test=$(whereis csh) | 106 | test=$(whereis csh) |
105 | if [ "$test" == "csh:" ] | 107 | if [ "$test" == "csh:" ] |
106 | then | 108 | then |
107 | echo -e "${txtpur}ERROR${txtrst} csh shell not found\n You have to install csh shell\n sudo apt-get install csh" | 109 | echo -e "${txtpur}ERROR${txtrst} csh shell not found\n You have to install csh shell\n sudo apt-get install csh" |
108 | exit 1; | 110 | exit 1; |
109 | fi | 111 | fi |
110 | echo -e "csh shell : \t ${txtgrn}OK${txtrst}" | 112 | echo -e "csh shell : \t ${txtgrn}OK${txtrst}" |
111 | fi | 113 | fi |
112 | 114 | ||
113 | ## Perl | 115 | ## Perl |
114 | test=$(whereis perl) | 116 | test=$(whereis perl) |
115 | if [ "$test" == "perl:" ] | 117 | if [ "$test" == "perl:" ] |
116 | then | 118 | then |
117 | echo -e "${txtpur}ERROR${txtrst} perl not found\n You have to install perl\n sudo apt-get install perl" | 119 | echo -e "${txtpur}ERROR${txtrst} perl not found\n You have to install perl\n sudo apt-get install perl" |
118 | exit 1; | 120 | exit 1; |
119 | fi | 121 | fi |
120 | echo -e "perl : \t ${txtgrn}OK${txtrst}" | 122 | echo -e "perl : \t ${txtgrn}OK${txtrst}" |
121 | 123 | ||
122 | ## iconv | 124 | ## iconv |
123 | test=$(whereis iconv) | 125 | test=$(whereis iconv) |
124 | if [ "$test" == "iconv:" ] | 126 | if [ "$test" == "iconv:" ] |
125 | then | 127 | then |
126 | echo -e "${txtpur}ERROR${txtrst} iconv not found\n You have to install iconv\n sudo apt-cache search iconv" | 128 | echo -e "${txtpur}ERROR${txtrst} iconv not found\n You have to install iconv\n sudo apt-cache search iconv" |
127 | exit 1; | 129 | exit 1; |
128 | fi | 130 | fi |
129 | echo -e "iconv : \t ${txtgrn}OK${txtrst}" | 131 | echo -e "iconv : \t ${txtgrn}OK${txtrst}" |
130 | 132 | ||
131 | ## SRI LM | 133 | ## SRI LM |
132 | if [ -z "$SRILM" ] && [ -z "$MACHINE_TYPE" ] | 134 | if [ -z "$SRILM" ] && [ -z "$MACHINE_TYPE" ] |
133 | then | 135 | then |
134 | echo -e "${txtpur}ERROR${txtrst} SRILM toolkit variables are not defined (SRILM and MACHINE_TYPE)\n You have to install SRILM Toolkit\n" | 136 | echo -e "${txtpur}ERROR${txtrst} SRILM toolkit variables are not defined (SRILM and MACHINE_TYPE)\n You have to install SRILM Toolkit\n" |
135 | exit 1; | 137 | exit 1; |
136 | fi | 138 | fi |
137 | export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE | 139 | export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE |
138 | echo -e "SRILM toolkit : \t ${txtgrn}OK${txtrst}" | 140 | echo -e "SRILM toolkit : \t ${txtgrn}OK${txtrst}" |
139 | 141 | ||
140 | ### Speeral Configuration ### | 142 | ### Speeral Configuration ### |
141 | 143 | ||
142 | echo -e "\n\t${txtblu}Speeral configuration${txtrst}\n" | 144 | echo -e "\n\t${txtblu}Speeral configuration${txtrst}\n" |
143 | echo -e "Download Speeral bin and data :" | 145 | echo -e "Download Speeral bin and data :" |
144 | scp -r rey@nyx:~/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/ | 146 | scp -r @nyx:~/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/ |
145 | echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n" | 147 | echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n" |
146 | cat $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ | 148 | cat $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ |
147 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ | 149 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ |
148 | | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ | 150 | | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ |
149 | > $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml | 151 | > $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml |
150 | echo $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml | 152 | echo $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml |
151 | cat $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ | 153 | cat $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ |
152 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ | 154 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ |
153 | | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ | 155 | | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ |
154 | > $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml | 156 | > $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml |
155 | echo $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml | 157 | echo $PWD/tools/Speeral/CFG/SpeeralSecondPass.xml |
156 | cat $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ | 158 | cat $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml.tmp | sed -e "s|<nom>[^<]*</nom>|<nom>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer</nom>|g" \ |
157 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ | 159 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ |
158 | | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ | 160 | | sed -e "s|<binode>[^<]*</binode>|<binode>$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer.bin</binode>|g" \ |
159 | > $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml | 161 | > $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml |
160 | echo $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml | 162 | echo $PWD/tools/Speeral/CFG/SpeeralThirdPass.xml |
161 | 163 | ||
162 | 164 | ||
163 | if [ $EXPLOITCONFPASS -eq 1 ] | 165 | if [ $EXPLOITCONFPASS -eq 1 ] |
164 | then | 166 | then |
165 | ### LIA ltbox ### | 167 | ### LIA ltbox ### |
166 | echo -e "\t${txtblu}Install lia_ltbox${txtrst}\n" | 168 | echo -e "\t${txtblu}Install lia_ltbox${txtrst}\n" |
167 | export LIA_TAGG_LANG="french" | 169 | export LIA_TAGG_LANG="french" |
168 | export LIA_TAGG="$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" | 170 | export LIA_TAGG="$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" |
169 | export LIA_PHON_REP="$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" | 171 | export LIA_PHON_REP="$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" |
170 | export LIA_BIGLEX="$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" | 172 | export LIA_BIGLEX="$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" |
171 | 173 | ||
172 | ### config lia_phon | 174 | ### config lia_phon |
173 | cd $LIA_PHON_REP | 175 | cd $LIA_PHON_REP |
174 | make all > /dev/null | 176 | make all > /dev/null |
175 | make ressource > /dev/null | 177 | make ressource > /dev/null |
176 | ### config lia_tagg | 178 | ### config lia_tagg |
177 | cd $LIA_TAGG | 179 | cd $LIA_TAGG |
178 | make all > /dev/null | 180 | make all > /dev/null |
179 | make ressource.french > /dev/null | 181 | make ressource.french > /dev/null |
180 | ### config lia_biglex | 182 | ### config lia_biglex |
181 | cd $LIA_BIGLEX | 183 | cd $LIA_BIGLEX |
182 | make -f makefile.biglex > /dev/null | 184 | make -f makefile.biglex > /dev/null |
183 | cd $OTMEDIA_HOME | 185 | cd $OTMEDIA_HOME |
184 | 186 | ||
185 | 187 | ||
186 | ### SOLR DB ### | 188 | ### SOLR DB ### |
187 | # Tomcat fisrtly | 189 | # Tomcat fisrtly |
188 | test=$(dpkg -l | grep "^ii" | grep tomcat) | 190 | test=$(dpkg -l | grep "^ii" | grep tomcat) |
189 | if [ "$test" == "" ] | 191 | if [ "$test" == "" ] |
190 | then | 192 | then |
191 | echo -e "${txtpur}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n" | 193 | echo -e "${txtpur}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n" |
192 | #exit 1; | 194 | #exit 1; |
193 | fi | 195 | fi |
194 | echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n" | 196 | echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n" |
195 | # SOLR secondly | 197 | # SOLR secondly |
196 | echo -e "\t${txtblu}Install SOLR DB${txtrst}\n" | 198 | echo -e "\t${txtblu}Install SOLR DB${txtrst}\n" |
197 | echo -e "You will need 300 Go of free space to install SOLR DB" | 199 | echo -e "You will need 300 Go of free space to install SOLR DB" |
198 | read -p "Continue ? (y/n) " solr | 200 | read -p "Continue ? (y/n) " solr |
199 | if [ "$solr" == "y" ] | 201 | if [ "$solr" == "y" ] |
200 | then | 202 | then |
201 | 203 | ||
202 | echo -e "Download SOLR DB\r" | 204 | echo -e "Download SOLR DB\r" |
203 | mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null | 205 | mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null |
204 | scp -r rey@nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR | 206 | scp -r @nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR |
205 | echo -e "Unzip SOLR DB\r" | 207 | echo -e "Unzip SOLR DB\r" |
206 | res=0 | 208 | res=0 |
207 | #res = $(tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" "$OTMEDIA_HOME/tools/SOLR/") | 209 | #res = $(tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" "$OTMEDIA_HOME/tools/SOLR/") |
208 | if [ $res -eq 2 ]; then echo " ${txtpur}NOT OK${txtrst}"; | 210 | if [ $res -eq 2 ]; then echo " ${txtpur}NOT OK${txtrst}"; |
209 | else echo " ${txtgrn}OK${txtrst}"; fi | 211 | else echo " ${txtgrn}OK${txtrst}"; fi |
210 | else | 212 | else |
211 | echo "Skipping SOLR install" | 213 | echo "Skipping SOLR install" |
212 | fi | 214 | fi |
213 | read -e -p "Configure SOLR DB server ? (y/n) " solr | 215 | read -e -p "Configure SOLR DB server ? (y/n) " solr |
214 | if [ "$solr" == "y" ] | 216 | if [ "$solr" == "y" ] |
215 | then | 217 | then |
216 | read -p "Enter SOLR server IP :" ip | 218 | read -p "Enter SOLR server IP :" ip |
217 | if [ "${ip}" == "" ];then ip="localhost";fi | 219 | if [ "${ip}" == "" ];then ip="localhost";fi |
218 | echo "machine = \"${ip}\"" > $OTMEDIA_HOME/tools/scripts/solrinfo.py | 220 | echo "machine = \"${ip}\"" > $OTMEDIA_HOME/tools/scripts/solrinfo.py |
219 | read -p "Enter SOLR server port :" port | 221 | read -p "Enter SOLR server port :" port |
220 | if [ "${port}" == "" ]; then port="8080";fi | 222 | if [ "${port}" == "" ]; then port="8080";fi |
221 | echo -e "\n\tSOLR server IP ${ip}" | 223 | echo -e "\n\tSOLR server IP ${ip}" |
222 | echo -e "\tSOLR server port ${port}" | 224 | echo -e "\tSOLR server port ${port}" |
223 | echo "port = \"${port}\"" >> $OTMEDIA_HOME/tools/scripts/solrinfo.py | 225 | echo "port = \"${port}\"" >> $OTMEDIA_HOME/tools/scripts/solrinfo.py |
224 | else | 226 | else |
225 | echo "Skipping SOLR DB Configuration" | 227 | echo "Skipping SOLR DB Configuration" |
226 | fi | 228 | fi |
227 | echo -e "\nSee SOLR.INSTALL file for more information\n" | 229 | echo -e "\nSee SOLR.INSTALL file for more information\n" |
228 | fi | 230 | fi |
229 | 231 | ||
230 | ### Set Variables in bashrc ### | 232 | ### Set Variables in bashrc ### |
231 | cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" > ~/.bashrc.org | 233 | cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" > ~/.bashrc.org |
232 | #cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "LIA_TAGG" | grep -v "LIA_PHON" | grep -v "LIA_BIGLEX" > ~/.bashrc.org | 234 | #cat ~/.bashrc | grep -v "OTMEDIA_HOME" | grep -v "SRILM_BIN" | grep -v "LIA_TAGG" | grep -v "LIA_PHON" | grep -v "LIA_BIGLEX" > ~/.bashrc.org |
233 | cp ~/.bashrc.org ~/.bashrc | 235 | cp ~/.bashrc.org ~/.bashrc |
234 | export OTMEDIA_HOME=$PWD | 236 | export OTMEDIA_HOME=$PWD |
235 | echo "export OTMEDIA_HOME=$PWD" >> ~/.bashrc | 237 | echo "export OTMEDIA_HOME=$PWD" >> ~/.bashrc |
236 | echo "export $PATH=$PATH:$PWD/main_tools" >> ~/.bashrc | 238 | echo "export $PATH=$PATH:$PWD/main_tools" >> ~/.bashrc |
237 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" >> ~/.bashrc | 239 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" >> ~/.bashrc |
238 | #echo "export LIA_TAGG_LANG=french" >> ~/.bashrc | 240 | #echo "export LIA_TAGG_LANG=french" >> ~/.bashrc |
239 | #echo "export LIA_TAGG=$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" >> ~/.bashrc | 241 | #echo "export LIA_TAGG=$OTMEDIA_HOME/tools/lia_ltbox/lia_tagg/" >> ~/.bashrc |
240 | #echo "export LIA_PHON_REP=$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" >> ~/.bashrc | 242 | #echo "export LIA_PHON_REP=$OTMEDIA_HOME/tools/lia_ltbox/lia_phon/" >> ~/.bashrc |
241 | #echo "export LIA_BIGLEX=$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" >> ~/.bashrc | 243 | #echo "export LIA_BIGLEX=$OTMEDIA_HOME/tools/lia_ltbox/lia_biglex/" >> ~/.bashrc |
242 | 244 | ||
243 | # set global configuration file | 245 | # set global configuration file |
244 | echo "OTMEDIA_HOME=$PWD" > $OTMEDIA_HOME/cfg/main_cfg.cfg | 246 | echo "OTMEDIA_HOME=$PWD" > $OTMEDIA_HOME/cfg/main_cfg.cfg |
245 | echo "ARCH=$ARCH" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 247 | echo "ARCH=$ARCH" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
246 | echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 248 | echo "VERBOSE=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
247 | echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 249 | echo "DEBUG=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
248 | echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 250 | echo "CHECK=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
249 | echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg | 251 | echo "RERUN=0" >> $OTMEDIA_HOME/cfg/main_cfg.cfg |
250 | 252 | ||
251 | echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n" | 253 | echo -e "\n\t${txtgrn}### Install completed ###${txtrst}\n" |
252 | echo -e "do : source ~/.bashrc" | 254 | echo -e "do : source ~/.bashrc" |
253 | echo -e "or set variable :\n" | 255 | echo -e "or set variable :\n" |
254 | echo "export OTMEDIA_HOME=$PWD" | 256 | echo "export OTMEDIA_HOME=$PWD" |
255 | echo "export PATH=$PATH:$OTMEDIA_HOME/main_tools" | 257 | echo "export PATH=\$PATH:$OTMEDIA_HOME/main_tools" |
256 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" | 258 | echo "export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE" |
257 | 259 | ||
258 | 260 | ||
259 | echo " \\\\ " | 261 | echo " \\\\ " |
260 | echo " ,-~~~-\\\\_" | 262 | echo " ,-~~~-\\\\_" |
261 | echo " ( .\ " | 263 | echo " ( .\ " |
262 | echo " @\___(__--'" | 264 | echo " @\___(__--'" |
263 | 265 | ||
264 | echo "${txtgrn}Yes${txtylw}I${txtpur}Rastafari{$txtrst}" | 266 | echo "${txtgrn}Yes${txtylw}I${txtcyn}Rastafari${txtrst}" |
265 | 267 |