File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,41 @@ echo " Config: @${username}/${slug}"
1010echo "========================================"
1111echo ""
1212
13+ install_xcode_clt() {
14+ if xcode-select -p &>/dev/null; then
15+ return 0
16+ fi
17+ echo "Installing Xcode Command Line Tools..."
18+ echo "(A dialog may appear - please click 'Install')"
19+ echo ""
20+ xcode-select --install 2>/dev/null || true
21+ echo "Waiting for Xcode Command Line Tools installation..."
22+ until xcode-select -p &>/dev/null; do
23+ sleep 5
24+ done
25+ echo "Xcode Command Line Tools installed!"
26+ echo ""
27+ }
28+
29+ install_homebrew() {
30+ if command -v brew &>/dev/null; then
31+ return 0
32+ fi
33+ echo "Installing Homebrew..."
34+ echo ""
35+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
36+ if [ "$(uname -m)" = "arm64" ]; then
37+ eval "$(/opt/homebrew/bin/brew shellenv)"
38+ else
39+ eval "$(/usr/local/bin/brew shellenv)"
40+ fi
41+ echo "Homebrew installed!"
42+ echo ""
43+ }
44+
45+ install_xcode_clt
46+ install_homebrew
47+
1348ARCH="$(uname -m)"
1449if [ "$ARCH" = "arm64" ]; then
1550 ARCH="arm64"
You can’t perform that action at this time.
0 commit comments