From b50ebdf386f824a5c217d5af6e05ca8fc527076d Mon Sep 17 00:00:00 2001 From: rey jean-Francois Date: Mon, 29 Jul 2013 12:50:46 +0200 Subject: [PATCH] update install.sh --- install.sh | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 8907709..240fca5 100755 --- a/install.sh +++ b/install.sh @@ -139,6 +139,7 @@ echo -e "SRILM toolkit : \t ${txtgrn}OK${txtrst}" ### Speeral Configuration ### +echo -e "Download Speeral bin and data :" scp -r rey@nyx:~/OTMEDIA_DATA/Speeral $OTMEDIA_HOME/tools/ echo -e "\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" \ @@ -192,21 +193,28 @@ then echo -e "\nTOMCAT : \t ${txtgrn}OK${txtrst}" # SOLR secondly echo -e "\t${txtblu}Install SOLR DB${txtrst}" - echo -e "Download SOLR DB\r" - mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null - scp -r rey@nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR - echo -e "Unzip SOLR DB\r" - #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}"; - else echo " ${txtgrn}OK${txtrst}"; fi - read -p "Enter SOLR server IP :" ip - if [ $ip == "" ];then ip="127.0.0.1";fi - echo 'machine = "194.57.216.43"' > $OTMEDIA_HOME/tools/scripts/solrinfo.py - read -p "Enter SOLR server port :" port - if [ $port == "" ]; then port="8080";fi - echo "\n\tSOLR server IP $ip" - echo "\tSOLR server port $port" - echo 'port = "8080"' >> $OTMEDIA_HOME/tools/scripts/solrinfo.py + read -p "You will need 300 Go of free space to install SOLR DB\nContinue ? (y/n) " solr + if [ "$solr" == "y" ] + then + + echo -e "Download SOLR DB\r" + mkdir -p $OTMEDIA_HOME/tools/SOLR 2> /dev/null + scp -r rey@nyx:~/OTMEDIA_DATA/SOLR/otmedia-2013-04.tar.gz $OTMEDIA_HOME/tools/SOLR + echo -e "Unzip SOLR DB\r" + #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}"; + else echo " ${txtgrn}OK${txtrst}"; fi + read -p "Enter SOLR server IP :" ip + if [ $ip == "" ];then ip="127.0.0.1";fi + echo 'machine = "194.57.216.43"' > $OTMEDIA_HOME/tools/scripts/solrinfo.py + read -p "Enter SOLR server port :" port + if [ $port == "" ]; then port="8080";fi + echo "\n\tSOLR server IP $ip" + echo "\tSOLR server port $port" + echo 'port = "8080"' >> $OTMEDIA_HOME/tools/scripts/solrinfo.py + else + echo "Skipping SOLR install" + fi fi ### Set Variables in bashrc ### -- 1.8.2.3