From 6ed95f60e3843158e197d7e213d377c0d1435387 Mon Sep 17 00:00:00 2001 From: benjamin <mlsuyt@protonmail.com> Date: Sat, 4 May 2019 09:19:30 -0400 Subject: [PATCH] generate configuration folder with python3 and python3.7 if failure --- install_gmixer.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/install_gmixer.sh b/install_gmixer.sh index 89e78de..41fa519 100755 --- a/install_gmixer.sh +++ b/install_gmixer.sh @@ -5,10 +5,9 @@ # contact mail : <pytlin@protonmail.com> - VERSION="2019.05.04" -set -e +#set -e #set -x # VARIABLES @@ -169,13 +168,18 @@ generateConfFolder () { noError="false" if [ ! -d "$HOME/.gmixer" ]; then if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then - $(which python3.7) $HOME/gmixer-py/server.py -i + $(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null checkCommand + if test $noError = "false" + then + $(which python3.7) $HOME/gmixer-py/server.py -i 2> /dev/null + checkCommand + fi elif [ "$OS" = "CentOS Linux" ]; then - $(which python3.6) $HOME/gmixer-py/server.py -i + $(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null checkCommand else - $(which python3.7) $HOME/gmixer-py/server.py -i + $(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null checkCommand fi else @@ -408,9 +412,15 @@ checkInstallPython () { launchGMixer () { noError="false" if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then - python3.7 $HOME/gmixer-py/server.py -s -d $HOME/.gmixer + $(which python3.7) $HOME/gmixer-py/server.py -s -d $HOME/.gmixer + checkCommand + if test $noError = "false" + then + $(which python3) $HOME/gmixer-py/server.py -s -d $HOME/.gmixer + fi + elif [ "$OS" = "CentOS Linux" ]; then - python3.6 $HOME/gmixer-py/server.py -s -d $HOME/.gmixer + $(which python3.6) $HOME/gmixer-py/server.py -s -d $HOME/.gmixer else printf "\n%bdistribution not yet supported...%b\n" "${yellow}" "${rescolor}" exit 1 @@ -827,11 +837,6 @@ mainVerbose () { fi fi fi - - - - - if [ "$parameterG" = "true" ] then printf "%bGenerate Salt and Password...%b\n" "${yellow}" "${rescolor}" -- GitLab