Commit c00c2f1895c534c2b33372d80b28bc751d54cd68
1 parent
05a45b5900
Exists in
master
up
Showing 1 changed file with 17 additions and 16 deletions Side-by-side Diff
install.sh
| ... | ... | @@ -9,10 +9,11 @@ |
| 9 | 9 | username=${LOGNAME} |
| 10 | 10 | |
| 11 | 11 | # Color variables |
| 12 | +txtred=$(tput setaf 1) # red | |
| 12 | 13 | txtgrn=$(tput setaf 2) # Green |
| 13 | 14 | txtylw=$(tput setaf 3) # Yellow |
| 14 | 15 | txtblu=$(tput setaf 4) # Blue |
| 15 | -txtpur=$(tput setaf 5) # Purple | |
| 16 | +txtred=$(tput setaf 5) # Purple | |
| 16 | 17 | txtcyn=$(tput setaf 6) # Cyan |
| 17 | 18 | txtwht=$(tput setaf 7) # White |
| 18 | 19 | txtrst=$(tput sgr0) # Text reset. |
| ... | ... | @@ -52,7 +53,7 @@ |
| 52 | 53 | test=$(whereis make) |
| 53 | 54 | if [ "$test" == "make:" ] |
| 54 | 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 | 57 | exit 1; |
| 57 | 58 | fi |
| 58 | 59 | echo -e "make \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -61,7 +62,7 @@ |
| 61 | 62 | test=$(whereis cc) |
| 62 | 63 | if [ "$test" == "cc:" ] |
| 63 | 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 | 66 | exit 1; |
| 66 | 67 | fi |
| 67 | 68 | echo -e "cc \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -70,7 +71,7 @@ |
| 70 | 71 | test=$(whereis avconv) |
| 71 | 72 | if [ "$test" == "avconv:" ] |
| 72 | 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 | 75 | exit 1; |
| 75 | 76 | fi |
| 76 | 77 | echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}" |
| 77 | 78 | |
| ... | ... | @@ -79,14 +80,14 @@ |
| 79 | 80 | test=$(whereis java) |
| 80 | 81 | if [ "$test" == "java:" ] |
| 81 | 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 | 84 | exit 1; |
| 84 | 85 | fi |
| 85 | 86 | echo -e "Java : JRE \t ${txtgrn}OK${txtrst}" |
| 86 | 87 | test=$(whereis javac) |
| 87 | 88 | if [ "$test" == "javac:" ] |
| 88 | 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 | 91 | exit 1; |
| 91 | 92 | fi |
| 92 | 93 | echo -e "Java : JDK \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -97,7 +98,7 @@ |
| 97 | 98 | test=$(whereis python) |
| 98 | 99 | if [ "$test" == "python:" ] |
| 99 | 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 | 102 | exit 1; |
| 102 | 103 | fi |
| 103 | 104 | echo -e "python : \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -106,7 +107,7 @@ |
| 106 | 107 | test=$(whereis csh) |
| 107 | 108 | if [ "$test" == "csh:" ] |
| 108 | 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 | 111 | exit 1; |
| 111 | 112 | fi |
| 112 | 113 | echo -e "csh shell : \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -116,7 +117,7 @@ |
| 116 | 117 | test=$(whereis perl) |
| 117 | 118 | if [ "$test" == "perl:" ] |
| 118 | 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 | 121 | exit 1; |
| 121 | 122 | fi |
| 122 | 123 | echo -e "perl : \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -125,7 +126,7 @@ |
| 125 | 126 | test=$(whereis iconv) |
| 126 | 127 | if [ "$test" == "iconv:" ] |
| 127 | 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 | 130 | exit 1; |
| 130 | 131 | fi |
| 131 | 132 | echo -e "iconv : \t ${txtgrn}OK${txtrst}" |
| ... | ... | @@ -133,7 +134,7 @@ |
| 133 | 134 | ## SRI LM |
| 134 | 135 | if [ -z "$SRILM" ] && [ -z "$MACHINE_TYPE" ] |
| 135 | 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 | 138 | exit 1; |
| 138 | 139 | fi |
| 139 | 140 | export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE |
| ... | ... | @@ -143,7 +144,7 @@ |
| 143 | 144 | |
| 144 | 145 | echo -e "\n\t${txtblu}Speeral configuration${txtrst}\n" |
| 145 | 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 | 148 | echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n" |
| 148 | 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 | 150 | | sed -e "s|<ngramme>[^<]*</ngramme>|<ngramme>$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6</ngramme>|g" \ |
| ... | ... | @@ -190,7 +191,7 @@ |
| 190 | 191 | test=$(dpkg -l | grep "^ii" | grep tomcat) |
| 191 | 192 | if [ "$test" == "" ] |
| 192 | 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 | 195 | #exit 1; |
| 195 | 196 | fi |
| 196 | 197 | echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n" |
| 197 | 198 | |
| ... | ... | @@ -203,11 +204,11 @@ |
| 203 | 204 | |
| 204 | 205 | echo -e "Download SOLR DB\r" |
| 205 | 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 | 208 | echo -e "Unzip SOLR DB\r" |
| 208 | 209 | res=0 |
| 209 | 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 | 212 | else echo " ${txtgrn}OK${txtrst}"; fi |
| 212 | 213 | else |
| 213 | 214 | echo "Skipping SOLR install" |
| ... | ... | @@ -263,5 +264,5 @@ |
| 263 | 264 | echo " ( .\ " |
| 264 | 265 | echo " @\___(__--'" |
| 265 | 266 | |
| 266 | -echo "${txtgrn}Yes${txtylw}I${txtcyn}Rastafari${txtrst}" | |
| 267 | +echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}" |