diff --git a/script/discover_package_manager b/script/discover_package_manager index 8ea9d7279771da732af9f9dda1eb7df52c17e903..0341883ce131a49e210fd51f4fc1dc8d45ad1cf8 100755 --- a/script/discover_package_manager +++ b/script/discover_package_manager @@ -16,8 +16,6 @@ function discover_package_manager() { echo -e "\033[43;30;1;5mWARNING: \033[0m $brew_idir is not writtable, brew require that $brew_idir is writtable and $brew_idir/bin is in your PATH, otherwise it will be not possible to install with brew" commands[0]="sudo chown -R $USER $brew_idir && chmod -R u+w $brew_idir" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi fi if [ ! -w ]; then diff --git a/script/pre_req b/script/pre_req index 56419fca37af33daf2742b007c42dbbec6f4921d..dbb483d2d4554554befce66ca4730cedebc7cbfe 100755 --- a/script/pre_req +++ b/script/pre_req @@ -47,8 +47,6 @@ if [ x"$platform" = x"linux" -a x"$pcman" = x"sudo apt-get" ]; then echo "OpenFPM require additional packages in order to install correctly" commands[0]="$pcman install libbz2-dev python-dev libxml2-dev libxslt-dev" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi fi @@ -67,8 +65,6 @@ if [ x"$platform" = x"linux" -a x"$pcman" = x"yum" ]; then commands[0]="su -c \"$pcman install bzip2-devel python-devel libxml2-devel libxslt-devel\"" commands[1]="sudo $pcman install bzip2-devel python-devel libxml2-devel libxslt-devel" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi fi diff --git a/script/show_solutions b/script/show_solutions index 110a654507d0342bdbf303b8fdf4052355a2e835..bb1af08758b4c9920d7be6a1f86c81ac1fabc400 100755 --- a/script/show_solutions +++ b/script/show_solutions @@ -15,5 +15,9 @@ 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 } diff --git a/script/solve_autoconf b/script/solve_autoconf index cb1f7cd50ec3802f30f4e2f281b7b1d8beecee41..f03dadad7227ce29a294718e7cca3208f430fb8c 100755 --- a/script/solve_autoconf +++ b/script/solve_autoconf @@ -13,14 +13,10 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install autoconf" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install autoconf\"" commands[1]="sudo $pcman install autoconf" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_automake b/script/solve_automake index 3f72585f95854f66abc04d55439436bf276354d1..d67b843104fd660084faa7e47ae9335fe8a29918 100755 --- a/script/solve_automake +++ b/script/solve_automake @@ -13,14 +13,10 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install automake" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install automake\"" commands[1]="sudo $pcman install automake" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_brew b/script/solve_brew index bbc74a59de23ff985d29afb6f99016296f2aa736..f532baf85797e8f99950a146e9ac68da98719d15 100755 --- a/script/solve_brew +++ b/script/solve_brew @@ -6,8 +6,6 @@ source script/show_solutions if [ x"$1" = x"osx" ]; then commands[0]="ruby -e \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_cmake b/script/solve_cmake index 2cb41a0775e631acfa2b175defca3449e1bd46a3..ffa472c9cd6d103023ae248ebb51d9a8b7acaed0 100755 --- a/script/solve_cmake +++ b/script/solve_cmake @@ -14,14 +14,10 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install cmake" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install cmake\"" commands[1]="sudo $pcman install cmake" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_gfortran b/script/solve_gfortran index af6d465c489115ae347a13c09544aec4f2b785c3..4314a7e607c2e552e0cf8b7d4037ce3cbd5605b3 100755 --- a/script/solve_gfortran +++ b/script/solve_gfortran @@ -13,14 +13,10 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install gcc" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install gfortran\"" commands[1]="sudo $pcman install gfortran" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_git b/script/solve_git index cdb01576173bb6211edb95821b23b0f04c66412d..aa803101472c573fac0abf5af2d36cc8b9723ddd 100755 --- a/script/solve_git +++ b/script/solve_git @@ -12,13 +12,9 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install git" - possible_solutions "${commands[@]}" - eval ${command[possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install git\"" commands[1]="sudo $pcman install git" - possible_solutions "${commands[@]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_gpp b/script/solve_gpp index f94d74ddeb7845bb0cae6e60c2f8288a51ab54f0..bfebc468f1606011335bbbaf11a6f2fc87795e17 100755 --- a/script/solve_gpp +++ b/script/solve_gpp @@ -14,8 +14,6 @@ if [ x"$1" = x"osx" ]; then commands[0]="$pcman install gcc49" commands[1]="echo \"Continue without installing\"" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} compiler_opt=" CXX=g++-4.9 CC=gcc-4.9 " compiler_gcc="gcc-4.9" compiler_gpp="g++-4.9" @@ -23,8 +21,6 @@ elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install gcc-c++\"" commands[1]="sudo $pcman install gcc-c++" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} compiler_gcc="gcc" compiler_gpp="g++" fi diff --git a/script/solve_libtool b/script/solve_libtool index 131d22b2d6e18b72d684dba4ad9a975d380b1086..ae13efd4b44925d4bb653ad99b9da756b117ab4b 100755 --- a/script/solve_libtool +++ b/script/solve_libtool @@ -15,14 +15,10 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install libtool" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install libtool\"" commands[1]="sudo $pcman install libtool" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi } diff --git a/script/solve_wget b/script/solve_wget index e6de78aa57dff75f755b61c8a40a2c2311714b5c..12ed4814313e8c651021e2193a34dc989ebe425d 100755 --- a/script/solve_wget +++ b/script/solve_wget @@ -13,14 +13,10 @@ fi if [ x"$1" = x"osx" ]; then commands[0]="$pcman install wget" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install wget\"" commands[1]="sudo $pcman install wget" possible_solutions "${commands[@]}" - echo "Executing: ${command[$possible_solutions_ret]}" - eval ${commands[$possible_solutions_ret]} fi }