Setup.sh: fix Python3.6 when broken on macOS
This commit is contained in:
		
							
								
								
									
										15
									
								
								setup.sh
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								setup.sh
									
									
									
									
									
								
							| @@ -33,6 +33,8 @@ function install_macos () { | |||||||
|         /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |         /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||||||
|     fi |     fi | ||||||
|     brew install python3 wget ta-lib |     brew install python3 wget ta-lib | ||||||
|  |  | ||||||
|  |     test_and_fix_python_on_mac | ||||||
| } | } | ||||||
|  |  | ||||||
| # Install bot Debian_ubuntu | # Install bot Debian_ubuntu | ||||||
| @@ -81,6 +83,19 @@ function reset () { | |||||||
|     updateenv |     updateenv | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function test_and_fix_python_on_mac() { | ||||||
|  |  | ||||||
|  |     if ! [ -x "$(command -v python3.6)" ] | ||||||
|  |     then | ||||||
|  |         echo "-------------------------" | ||||||
|  |         echo "Fixing Python" | ||||||
|  |         echo "-------------------------" | ||||||
|  |         echo "Python 3.6 is not linked in your system. Fixing it..." | ||||||
|  |         brew link --overwrite python | ||||||
|  |         echo | ||||||
|  |     fi | ||||||
|  | } | ||||||
|  |  | ||||||
| function config_generator () { | function config_generator () { | ||||||
|  |  | ||||||
|     echo "Starting to generate config.json" |     echo "Starting to generate config.json" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user