diff --git a/install b/install index 744e8f2cbb77e1d0583a0ba6dd980263a81c49e3..fb179b6a0a45e39cfad9940aad1f23ae54dab476 100755 --- a/install +++ b/install @@ -125,7 +125,11 @@ if [ $sq -eq 0 ]; then fi echo -e "\033[1mHow many core you want to use to install the dependencies?\033[0m" -read ncore +if [ $sq -eq 0 ]; then + read ncore +else + ncore = 4 +fi echo -e "Installing requirements into: $i_dir " @@ -141,7 +145,11 @@ if [ ! -d "$i_dir/PETSC" -o ! -d "$i_dir/EIGEN" ]; then echo -e "\033[1;34m Optional packages \033[0m" echo -e "\033[1mDo you want to install linear algebra packages ?(y/n)\033[0m" echo "Installation can take long time (90 minutes on i7-3612QM 4 cores)" - read inst_lin_alg + if [ $sq -eq 0 ]; then + read inst_lin_alg + else + inst_lin_alg = n + fi # if [ ! x"$choose" == x"0" ]; then # ./script/install_PETSC.sh $i_dir $choose diff --git a/script/show_solutions b/script/show_solutions index bb1af08758b4c9920d7be6a1f86c81ac1fabc400..c738530b3b024b881f94067090f500f4c82e445c 100755 --- a/script/show_solutions +++ b/script/show_solutions @@ -1,6 +1,11 @@ #! /bin/bash function possible_solutions { + + if [ $sq -eq 0 ]; then + return + fi + sol=1 echo "Possible solutions:" for com in "$@" @@ -15,9 +20,7 @@ function possible_solutions { exit 1 fi possible_solutions_ret=`expr $choose - 1` - if [ $sq -eq 0 ]; then - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} - fi + echo "Executing: ${command[$possible_solutions_ret]}" + eval ${commands[$possible_solutions_ret]} }