|
1 | 1 | #!/bin/bash |
2 | 2 | set -euo pipefail |
3 | 3 |
|
| 4 | + |
| 5 | +is_cygwin_etal() { |
| 6 | + uname -s | grep -qE "CYGWIN|MINGW|MSYS" |
| 7 | +} |
| 8 | +is_wsl() { |
| 9 | + grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null |
| 10 | +} |
| 11 | +if is_cygwin_etal || is_wsl; then |
| 12 | + echo "Quick start does not support Windows" |
| 13 | + exit 1 |
| 14 | +fi |
| 15 | + |
| 16 | + |
4 | 17 | # Colors and styles |
5 | 18 | RESET='\033[0m' |
6 | 19 | BOLD='\033[1m' |
@@ -69,8 +82,8 @@ docker_path=$(command -v docker || true) |
69 | 82 | if [ -n "$docker_path" ]; then |
70 | 83 | print_partial_message " ⭐️ Found " "docker" ": $docker_path" "$BOLD" |
71 | 84 | else |
72 | | - print_partial_message " 💥 Could not find " "docker" ". Please follow this link to install it..." "$BOLD" |
73 | | - print_message "" " https://minikube.sigs.k8s.io/docs/drivers/docker/" "$BOLD" |
| 85 | + print_partial_message " 💥 Could not find " "docker" ". Please follow this link to install Docker Engine..." "$BOLD" |
| 86 | + print_message "" " https://docs.docker.com/engine/install/" "$BOLD" |
74 | 87 | exit 127 |
75 | 88 | fi |
76 | 89 |
|
@@ -128,9 +141,16 @@ print_message "" "" "" |
128 | 141 | print_message "" " Let's try to spin up a python virtual environment..." "" |
129 | 142 | print_message "" "" "" |
130 | 143 |
|
131 | | -python3 -m venv .venv |
| 144 | +if [ -d ".venv" ]; then |
| 145 | + print_message "" " It looks like a virtual environment already exists!" "" |
| 146 | +else |
| 147 | + print_message "" " Creating a new virtual environment..." "" |
| 148 | + python3 -m venv .venv |
| 149 | +fi |
| 150 | + |
132 | 151 | source .venv/bin/activate |
133 | 152 |
|
| 153 | +print_message "" "" "" |
134 | 154 | print_partial_message " ⭐️ " "venv" ": The python virtual environment looks good" "$BOLD" |
135 | 155 | print_message "" "" "" |
136 | 156 | print_message "" " Let's install warnet into that virtual environment..." "" |
|
156 | 176 | print_message "" "🥳" "" |
157 | 177 | print_message "" "Run the following command to enter into the python virtual environment..." "" |
158 | 178 | print_message "" " source .venv/bin/activate" "$BOLD" |
159 | | -print_partial_message " After that, you can run " "warcli" " to start running Warnet commands." "$BOLD" |
| 179 | +print_partial_message " After that, you can run " "warcli help" " to start running Warnet commands." "$BOLD" |
0 commit comments