Skip to content

Commit aeb7fe6

Browse files
committed
update w/ Will's recommendations
1 parent 311efca commit aeb7fe6

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

quick_start.sh

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/bin/bash
22
set -euo pipefail
33

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+
417
# Colors and styles
518
RESET='\033[0m'
619
BOLD='\033[1m'
@@ -69,8 +82,8 @@ docker_path=$(command -v docker || true)
6982
if [ -n "$docker_path" ]; then
7083
print_partial_message " ⭐️ Found " "docker" ": $docker_path" "$BOLD"
7184
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"
7487
exit 127
7588
fi
7689

@@ -128,9 +141,16 @@ print_message "" "" ""
128141
print_message "" " Let's try to spin up a python virtual environment..." ""
129142
print_message "" "" ""
130143

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+
132151
source .venv/bin/activate
133152

153+
print_message "" "" ""
134154
print_partial_message " ⭐️ " "venv" ": The python virtual environment looks good" "$BOLD"
135155
print_message "" "" ""
136156
print_message "" " Let's install warnet into that virtual environment..." ""
@@ -156,4 +176,4 @@ done
156176
print_message "" "🥳" ""
157177
print_message "" "Run the following command to enter into the python virtual environment..." ""
158178
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

Comments
 (0)