-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup-mac.sh
More file actions
73 lines (58 loc) · 1.29 KB
/
setup-mac.sh
File metadata and controls
73 lines (58 loc) · 1.29 KB
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
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
echo "Usage: ./${0}
A script to setup a new Mac
First, ensure you have set XDG_CONFIG_HOME properly
Refer: https://stackoverflow.com/questions/55648312/mac-os-x-mojave-set-environment-variable-permanently
"
exit
fi
cd "$(dirname "$0")"
check_requirements() {
if [[ -z XDG_CONFIG_HOME ]]; then
echo "Variable XDG_CONFIG_HOME not set!!!"
exit 1
fi
}
install_apps() {
brew install --cask brave-browser
brew install --cask visual-studio-code
brew install --cask slack
brew install --cask kitty
brew install --cask karabiner-elements
brew install --cask obsidian
brew install tmux
}
install_homebrew() {
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
}
install_nvm() {
brew install nvm
}
install_pyenv() {
brew install pyenv
}
setup_pure_prompt() {
brew install pure
}
install_ohmyzsh () {
git clone https://github.com/ohmyzsh/ohmyzsh.git "$XDG_CONFIG_HOME/.oh-my-zsh"
echo "source $XDG_CONFIG_HOME/zsh/zshrc" > "$HOME/.zshrc"
}
install_fzf() {
brew install fzf
}
main() {
check_requirements
install_homebrew
install_nvm
install_pyenv
install_ohmyzsh
setup_pure_prompt
install_fzf
install_apps
}
main "$@"