-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmac_with_apple_silicon
executable file
·102 lines (74 loc) · 4.01 KB
/
mac_with_apple_silicon
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
#!/bin/bash
set -eu
cd "$HOME"
echo -e "Load environment variables"
curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/.zsh/variables.zsh -o "/tmp/variables.zsh"
if [ -f '/tmp/variables.zsh' ]; then
source /tmp/variables.zsh
rm -f '/tmp/variables.zsh'
fi
echo -e "\nCheck CPU brand"
: "${CPU_BRAND:=$(/usr/sbin/sysctl -n machdep.cpu.brand_string)}"
echo "$CPU_BRAND"
if ! echo "$CPU_BRAND" | grep --silent 'Apple'; then
echo "Run commands as arm64 on this system is not supported."
exit 1
fi
echo -e "\nInstall Rosetta 2"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_rosetta.sh)
echo -e "\nMake sure to run as arm64 architecture"
if [ "$(uname -m)" = "x86_64" ]; then
exec arch -arch arm64e "$SHELL"
fi
echo -e "\nEnable to sudo authenticate with touch id"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/enable_to_sudo_authenticate_with_touch_id.sh)
echo -e "\nGenerate key pair"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/generate_key_pair.sh)
echo -e "\nSetup Command Line Tools"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_command_line_tools.sh)
echo -e "\nInstall Homebrew"
if [ ! -x "$(command -v brew)" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
echo -e "\nInstall commands and Apps"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/brewfile.sh)
echo -e "\nPut iTerm2Rosetta.app based on iTerm.app"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/put_iterm2_using_rosetta2.sh)
echo -e "\nSetup directories"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_directories.sh)
echo -e "\nSetup fonts"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_fonts.sh)
echo -e "\nEnable key-repeating on 'Visual Studio Code'"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/enable_to_key-repeating_on_vscode.sh)
echo -e "\nDownload settings"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/download_settings.sh)
echo -e "\nPut settings"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/put_settings.sh)
echo -e "\nPut scripts"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/put_scripts.sh)
echo -e "\nSetup Rust"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_rust.sh)
echo -e "\nSetup Ruby"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_ruby.sh)
echo -e "\nSetup Python"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_python.sh)
echo -e "\nSetup Perl"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_perl.sh)
echo -e "\nSetup Java"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_java.sh)
echo -e "\nSetup Node.js"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_nodejs.sh)
echo -e "\nSetup Go"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_go.sh)
echo -e "\nSetup Terraform"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_terraform.sh)
echo -e "\nSetup Flutter"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_flutter.sh)
echo -e "\nApply private settings"
if [ -f "$HOME/.mac.private" ]; then
bash "$HOME/.mac.private"
fi
echo -e "\nUse zsh installed via Homebrew as default shell"
bash <(curl -fsSL https://raw.githubusercontent.com/machupicchubeta/dotfiles/main/bin/setup_default_shell.sh)
echo -e "\nLoad direnv"
if command -v direnv > /dev/null && [ -f .envrc ]; then direnv allow; fi