-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_script_mac.sh
executable file
·110 lines (88 loc) · 2.7 KB
/
install_script_mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
# Refresh sudo timestamp
sudo -v
# Keep-alive: update existing sudo time stamp until script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Check if Homebrew was installed successfully
if [ $? -eq 0 ]; then
echo "Homebrew installed successfully."
# Install Git using Homebrew
brew install git
# Check if Git was installed successfully
if [ $? -eq 0 ]; then
echo "Git installed successfully."
else
echo "Failed to install Git."
exit 1
fi
# Install Leapp using Homebrew
brew install leapp
# Check if Leapp was installed successfully
if [ $? -eq 0 ]; then
echo "Leapp installed successfully."
else
echo "Failed to install Leapp."
exit 1
fi
# Install AWS CLI using Homebrew
brew install awscli
# Check if AWS CLI was installed successfully
if [ $? -eq 0 ]; then
echo "AWS CLI installed successfully."
else
echo "Failed to install AWS CLI."
exit 1
fi
# Install pyenv using Homebrew
brew install pyenv
# Check if pyenv was installed successfully
if [ $? -eq 0 ]; then
echo "pyenv installed successfully."
# Install Python 3.9.18 using pyenv
pyenv install 3.9.18
# Check if Python 3.9.18 was installed successfully
if [ $? -eq 0 ]; then
echo "Python 3.9.18 installed successfully."
# Set Python 3.9.18 as the global version
pyenv global 3.9.18
# Check if Python 3.9.18 was set as the global version successfully
if [ $? -eq 0 ]; then
echo "Python 3.9.18 set as global version successfully."
else
echo "Failed to set Python 3.9.18 as the global version."
exit 1
fi
else
echo "Failed to install Python 3.9.18."
exit 1
fi
else
echo "Failed to install pyenv."
exit 1
fi
# Install pipx using Homebrew
brew install pipx
# Check if pipx was installed successfully
if [ $? -eq 0 ]; then
echo "pipx installed successfully."
else
echo "Failed to install pipx."
exit 1
fi
# Ensure pipx path
pipx ensurepath
sudo pipx ensurepath
# Install poetry using pipx
pipx install poetry
# Check if poetry was installed successfully
if [ $? -eq 0 ]; then
echo "poetry installed successfully."
else
echo "Failed to install poetry."
exit 1
fi
else
echo "Failed to install Homebrew."
fi