Commit c5e9db6a9b3e8d5b5be069048ad22c3e7864d219

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

update

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