From bd693277a2df51fbe0534c3eb72ca16264fe4d9c Mon Sep 17 00:00:00 2001 From: martinahansen Date: Sun, 23 Oct 2011 12:41:50 +0000 Subject: [PATCH] updated biopieces_installer - adding bash check git-svn-id: http://biopieces.googlecode.com/svn/trunk@1596 74ccb610-7750-0410-82ae-013aeee3265d --- ...ler-0.3.sh => biopieces_installer-0.41.sh} | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) rename bp_scripts/{biopieces_installer-0.3.sh => biopieces_installer-0.41.sh} (91%) diff --git a/bp_scripts/biopieces_installer-0.3.sh b/bp_scripts/biopieces_installer-0.41.sh similarity index 91% rename from bp_scripts/biopieces_installer-0.3.sh rename to bp_scripts/biopieces_installer-0.41.sh index c0f51c9..545380b 100755 --- a/bp_scripts/biopieces_installer-0.3.sh +++ b/bp_scripts/biopieces_installer-0.41.sh @@ -120,6 +120,10 @@ function prompt_install echo "" echo " http://groups.google.com/group/biopieces" echo "" + echo " Bugs & issues:" + echo "" + echo " http://code.google.com/p/biopieces/issues/list" + echo "" while true; do read -p "Continue (yes/no)? " answer @@ -174,6 +178,7 @@ function prompt_test_prerequisites { echo "Testing prerequisites:" + test_bash test_svn test_perl test_perl_module "Inline" @@ -205,7 +210,7 @@ function prompt_test_prerequisites echo "" echo " Any WARNINGs indicate that the executable for that auxillary" echo " program could not be found. While not critical, this will" - echo " cause some Biopieces to fail." + echo " cause some Biopieces to FAIL." while true; do read -p "Continue (yes/no)? " answer @@ -219,7 +224,7 @@ function prompt_test_prerequisites # Function to prompt the selection of the code directory. function prompt_install_dir_code { - read -p "Enter directory to install Biopieces code (default: $bp_code): " answer; + read -p "Enter directory for the Biopieces code (default: $bp_code): " answer; bp_code=${answer:-"$bp_code"} @@ -237,7 +242,7 @@ function prompt_install_dir_code # Function to prompt the selection of the data directory. function prompt_install_dir_data { - read -p "Enter directory to install Biopieces data (default: $bp_data): " answer; + read -p "Enter directory for the Biopieces data (default: $bp_data): " answer; bp_data=${answer:-"$bp_data"} @@ -255,7 +260,7 @@ function prompt_install_dir_data # Function to prompt the selection of the log directory. function prompt_install_dir_log { - read -p "Enter directory to install Biopieces log (default: $bp_log): " answer; + read -p "Enter directory for the Biopieces log file (default: $bp_log): " answer; bp_log=${answer:-"$bp_log"} @@ -273,7 +278,7 @@ function prompt_install_dir_log # Function to prompt the selection of the tmp directory. function prompt_install_dir_tmp { - read -p "Enter directory to install Biopieces tmp (default: $bp_tmp): " answer; + read -p "Enter directory for the Biopieces temporary files (default: $bp_tmp): " answer; bp_tmp=${answer:-"$bp_tmp"} @@ -364,6 +369,20 @@ source \"\$BP_DIR/bp_conf/bashrc\" fi } +# Function to test if we are running bash. +function test_bash +{ + echo -n " Testing if the running shell is bash: " + + if [ `echo $SHELL | grep "bash"` ]; then + echo_green "OK" + else + echo_red "FAIL" + echo " Biopieces requires bash shell not - $SHELL." + exit_abort + fi +} + # Function to test if subversion client is in $PATH. function test_svn { @@ -491,7 +510,9 @@ function prompt_test_biopieces "$BP_DIR/bp_test/test_all" echo "" - echo " Any FAIL indicates broken Biopieces - seek help!" + echo " Any FAIL indicates broken Biopieces. This is probably because of" + echo " missing prerequisites (see WARNINGs). You can verify this later by" + echo " inspecting the documentation for those Biopieces. Otherwise - seek help!" while true; do read -p "Continue (yes/no)? " answer -- 2.39.2