Votre Nom 1 year ago
parent
commit
acd774c828
1 changed files with 20 additions and 19 deletions
  1. 20 19
      options/chia.sh

+ 20 - 19
options/chia.sh

@@ -50,14 +50,15 @@ BladeBit=${BladeBit^^}
 ChiaPos=${ChiaPos^^}
 Miner=${Miner^^}
 ChiaProxy=${ChiaProxy^^}
-if [ $Gui = "YES" ] || [ $Gui = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $MadMax = "YES" ] || [ $MadMax = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $GigaHorse = "YES" ] || [ $GigaHorse = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $BladeBit = "YES" ] || [ $BladeBit = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $ChiaPos = "YES" ] || [ $ChiaPos = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $ChiaService = "YES" ] || [ $ChiaService = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $Miner = "YES" ] || [ $Miner = "NO" ];then error_flag=0;else error_flag=1;fi
-if [ $ChiaProxy = "YES" ] || [ $ChiaProxy = "NO" ];then error_flag=0;else error_flag=1;fi
+if [[ "$Gui" ==  "YES" ]] || [[ "$Gui" == "NO" ]] || [[ "$Gui" == "ONLY" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1)) ;fi
+if [[ "$MadMax" ==  "YES" ]] || [[ "$MadMax" = "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1)) ;fi
+if [[ "$GigaHorse" ==  "YES" ]] || [[ "$GigaHorse" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+if [[ "$BladeBit" == "YES" ]] || [[ "$BladeBit" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+if [[ "$ChiaPos" == "YES" ]] || [[ "$ChiaPos" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+if [[ "$ChiaService" == "YES" ]] || [[ "$ChiaService" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+if [[ "$Miner" == "YES" ]] || [[ "$Miner" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+if [[ "$ChiaProxy" == "YES" ]] || [[ "$ChiaProxy" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+echo $error_flag
 }
 
 function intro_ {
@@ -69,10 +70,10 @@ print_centered "|______|__|__||__||___._|"
 echo -n "$(tput sgr0)"
 print_centered "Toolkit for Chia v$Version"
 echo ""
-if [ $error_flag = 1 ]
+if [ $error_flag -ne 0 ]
 then
         echo -n "$(tput setaf 1 ;tput blink;tput bold)"
-        print_centered "Config Error !!!"
+        print_centered "Config Error !!! $error_flag"
         echo -n "$(tput sgr0)"
         exit 0
 fi
@@ -92,7 +93,7 @@ NO)
 	;;
 ONLY)
 	echo -n "$(tput setaf 41)"
-	print_centered "Blockchain wallet Only"
+	print_centered "Blockchain + GUI wallet Only"
 	echo -n "$(tput sgr0)"
 	;;
 *)
@@ -416,20 +417,20 @@ simplify_config
 intro_
 update_
 cmake_
+case $Gui in
+ONLY)
+	chia_blockchain
+	;;
+*)
 if [ $GigaHorse = "YES" ];then gigahorse;fi
 if [ $MadMax = "YES" ];then chia_plotter;fi
 if [ $BladeBit = "YES" ];then bladebit;fi
 if [ $ChiaPos = "YES" ];then chiapos;fi
-if [ $ChiaService = "YES" ];then service_;fi
 if [ $Miner = "YES" ];then miner_;fi
+if [ $ChiaService = "YES" ];then service_;fi
 if [ $ChiaProxy = "YES" ]; then chia_proxy;fi
-
-case $Gui in
-YES|ONLY)
-        chia_blockchain
-	;;
-*)
-        ;;
+if [ $gui = "YES"]; then chia_blockchain;fi
+	 ;;
 esac
 
 echo -e "\n\e[97mEnd of process...\e[0m"