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