-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.sh
executable file
·57 lines (47 loc) · 995 Bytes
/
devenv.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
#!/bin/zsh -eo pipefail
source "utils/log.sh"
function rosetta() {
if ! /usr/bin/pgrep oahd >/dev/null 2>&1; then
log info "Setting rosetta..."
softwareupdate --install-rosetta --agree-to-license
log info "Done."
fi
}
function macos() {
if [[ -f "macos/setup.sh" ]]; then
log info "Setting up Mac OS..."
cd macos && ./setup.sh && cd ..
log info "Done."
fi
}
function brew() {
if [[ -f "brew/setup.sh" ]]; then
log info "Setting up brew..."
cd brew && ./setup.sh && cd ..
log info "Done."
fi
}
function dotfiles() {
if [[ -f "dotfiles/setup.sh" ]]; then
log info "Setting up dotfiles..."
cd dotfiles && ./setup.sh && cd ..
log info "Done."
fi
}
function mise() {
if [[ -f "mise/setup.sh" ]]; then
log info "Setting up mise..."
cd mise && ./setup.sh && cd ..
log info "Done."
fi
}
function main() {
log info "Setting up devenv..."
rosetta
macos
brew
mise
dotfiles
log info "Done."
}
main "$@"