diff --git a/install.sh b/install.sh
index d02c524..178969e 100755
--- a/install.sh
+++ b/install.sh
@@ -9,10 +9,11 @@
username=${LOGNAME}
# Color variables
+txtred=$(tput setaf 1) # red
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
-txtpur=$(tput setaf 5) # Purple
+txtred=$(tput setaf 5) # Purple
txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset.
@@ -52,7 +53,7 @@ echo -e "\n\t${txtblu}Check Dependencies${txtrst}\n"
test=$(whereis make)
if [ "$test" == "make:" ]
then
- echo -e "${txtpur}ERROR${txtrst} make not found\n You have to install make\n sudo apt-get install make"
+ echo -e "${txtred}ERROR${txtrst} make not found\n You have to install make\n sudo apt-get install make"
exit 1;
fi
echo -e "make \t ${txtgrn}OK${txtrst}"
@@ -61,7 +62,7 @@ echo -e "make \t ${txtgrn}OK${txtrst}"
test=$(whereis cc)
if [ "$test" == "cc:" ]
then
- echo -e "${txtpur}ERROR${txtrst} cc not found\n You have to install cc\n sudo apt-get install gcc"
+ echo -e "${txtred}ERROR${txtrst} cc not found\n You have to install cc\n sudo apt-get install gcc"
exit 1;
fi
echo -e "cc \t ${txtgrn}OK${txtrst}"
@@ -70,7 +71,7 @@ echo -e "cc \t ${txtgrn}OK${txtrst}"
test=$(whereis avconv)
if [ "$test" == "avconv:" ]
then
- echo -e "${txtpur}ERROR${txtrst} avconv not found\n You have to install avconv\n sudo apt-get install libav-tools"
+ echo -e "${txtred}ERROR${txtrst} avconv not found\n You have to install avconv\n sudo apt-get install libav-tools"
exit 1;
fi
echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}"
@@ -79,14 +80,14 @@ echo -e "libav-tools : avconv \t ${txtgrn}OK${txtrst}"
test=$(whereis java)
if [ "$test" == "java:" ]
then
- echo -e "${txtpur}ERROR${txtrst} java not found\n You have to install java JRE\n sudo apt-get install openjdk-7-jre"
+ echo -e "${txtred}ERROR${txtrst} java not found\n You have to install java JRE\n sudo apt-get install openjdk-7-jre"
exit 1;
fi
echo -e "Java : JRE \t ${txtgrn}OK${txtrst}"
test=$(whereis javac)
if [ "$test" == "javac:" ]
then
- echo -e "${txtpur}ERROR${txtrst} javac not found\n You have to install java JDK\n sudo apt-get install openjdk-7-jdk"
+ echo -e "${txtred}ERROR${txtrst} javac not found\n You have to install java JDK\n sudo apt-get install openjdk-7-jdk"
exit 1;
fi
echo -e "Java : JDK \t ${txtgrn}OK${txtrst}"
@@ -97,7 +98,7 @@ then
test=$(whereis python)
if [ "$test" == "python:" ]
then
- echo -e "${txtpur}ERROR${txtrst} python not found\n You have to install python\n sudo apt-get install python"
+ echo -e "${txtred}ERROR${txtrst} python not found\n You have to install python\n sudo apt-get install python"
exit 1;
fi
echo -e "python : \t ${txtgrn}OK${txtrst}"
@@ -106,7 +107,7 @@ then
test=$(whereis csh)
if [ "$test" == "csh:" ]
then
- echo -e "${txtpur}ERROR${txtrst} csh shell not found\n You have to install csh shell\n sudo apt-get install csh"
+ echo -e "${txtred}ERROR${txtrst} csh shell not found\n You have to install csh shell\n sudo apt-get install csh"
exit 1;
fi
echo -e "csh shell : \t ${txtgrn}OK${txtrst}"
@@ -116,7 +117,7 @@ fi
test=$(whereis perl)
if [ "$test" == "perl:" ]
then
- echo -e "${txtpur}ERROR${txtrst} perl not found\n You have to install perl\n sudo apt-get install perl"
+ echo -e "${txtred}ERROR${txtrst} perl not found\n You have to install perl\n sudo apt-get install perl"
exit 1;
fi
echo -e "perl : \t ${txtgrn}OK${txtrst}"
@@ -125,7 +126,7 @@ echo -e "perl : \t ${txtgrn}OK${txtrst}"
test=$(whereis iconv)
if [ "$test" == "iconv:" ]
then
- echo -e "${txtpur}ERROR${txtrst} iconv not found\n You have to install iconv\n sudo apt-cache search iconv"
+ echo -e "${txtred}ERROR${txtrst} iconv not found\n You have to install iconv\n sudo apt-cache search iconv"
exit 1;
fi
echo -e "iconv : \t ${txtgrn}OK${txtrst}"
@@ -133,7 +134,7 @@ echo -e "iconv : \t ${txtgrn}OK${txtrst}"
## SRI LM
if [ -z "$SRILM" ] && [ -z "$MACHINE_TYPE" ]
then
- echo -e "${txtpur}ERROR${txtrst} SRILM toolkit variables are not defined (SRILM and MACHINE_TYPE)\n You have to install SRILM Toolkit\n"
+ echo -e "${txtred}ERROR${txtrst} SRILM toolkit variables are not defined (SRILM and MACHINE_TYPE)\n You have to install SRILM Toolkit\n"
exit 1;
fi
export SRILM_BIN=$SRILM/bin/$MACHINE_TYPE
@@ -143,7 +144,7 @@ echo -e "SRILM toolkit : \t ${txtgrn}OK${txtrst}"
echo -e "\n\t${txtblu}Speeral configuration${txtrst}\n"
echo -e "Download Speeral bin and data :"
-scp -r @nyx:~/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/
+scp -r ${username}@nyx:~/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/
echo -e "\n\t${txtblu}Generating Speeral configuration files :${txtrst}\n"
cat $PWD/tools/Speeral/CFG/SpeeralFirstPass.xml.tmp | sed -e "s|[^<]*|$PWD/tools/Speeral/LEX/LEXIQUE_V6.speer|g" \
| sed -e "s|[^<]*|$PWD/tools/Speeral/LM/ML_4gOTMEDIA_LEXIQUE_V6|g" \
@@ -190,7 +191,7 @@ then
test=$(dpkg -l | grep "^ii" | grep tomcat)
if [ "$test" == "" ]
then
- echo -e "${txtpur}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n"
+ echo -e "${txtred}ERROR${txtrst} TOMCAT seems to not be installed)\n You have to install TOMCAT\n"
#exit 1;
fi
echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}\n"
@@ -203,11 +204,11 @@ then
echo -e "Download SOLR DB\r"
mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null
- scp -r @nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR
+ scp -r ${username}@nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR
echo -e "Unzip SOLR DB\r"
res=0
#res = $(tar -xvzf "$OTMEDIA_HOME/tools/SOLR/otmedia-2013-04.tar.gz" "$OTMEDIA_HOME/tools/SOLR/")
- if [ $res -eq 2 ]; then echo " ${txtpur}NOT OK${txtrst}";
+ if [ $res -eq 2 ]; then echo " ${txtred}NOT OK${txtrst}";
else echo " ${txtgrn}OK${txtrst}"; fi
else
echo "Skipping SOLR install"
@@ -263,4 +264,4 @@ echo " ,-~~~-\\\\_"
echo " ( .\ "
echo " @\___(__--'"
-echo "${txtgrn}Yes${txtylw}I${txtcyn}Rastafari${txtrst}"
+echo "${txtgrn}Yes${txtylw}I${txtred}Rastafari${txtrst}"