Commit 328c20519626eaac799d5af4a1f7db42ab225502

Authored by Jean-François Rey
1 parent f342317309
Exists in master

bugfix

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

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