-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·59 lines (52 loc) · 1.86 KB
/
setup
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
#!/bin/sh
set -e
check_dependency() {
command -v "$1" 1>/dev/null 2>/dev/null
}
install_dependency() {
case $1 in
"linux")
sudo apt-get install -y $2
;;
"macos")
brew install $2
;;
esac
}
setup_macos() {
check_dependency "brew" || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
check_dependency "ag" || install_dependency "macos" "the_silver_searcher"
check_dependency "rg" || install_dependency "macos" "ripgrep"
check_dependency "asdf" || install_dependency "macos" "asdf"
check_dependency "ctags" || install_dependency "macos" "ctags"
check_dependency "fzf" || install_dependency "macos" "fzf"
check_dependency "jq" || install_dependency "macos" "jq"
check_dependency "nvim" || install_dependency "macos" "neovim"
check_dependency "rcup" || install_dependency "macos" "rcm"
check_dependency "tmux" || install_dependency "macos" "tmux"
check_dependency "alacritty" || install_dependency "macos" "alacritty"
check_dependency "tree" || install_dependency "macos" "tree"
}
setup_macos
env RCRC=$HOME/dotfiles/rcrc rcup
asdf plugin add python
asdf plugin add nodejs
asdf plugin add ruby
asdf plugin update --all
asdf install
FONT_FILE_NAME="/Library/Fonts/MesloLGMNerdFont-Regular.ttf"
if [[ ! -f $FONT_FILE_NAME ]]; then
curl -so $FONT_FILE_NAME https://raw.githubusercontent.com/ryanoasis/nerd-fonts/630a3eebaae362059cbc7a948126a9339db2e548/patched-fonts/Meslo/M/Regular/MesloLGMNerdFont-Regular.ttf
fi
echo "Automated steps done! Now onto the manual bits..."
manual_steps=(
"Open Alacritty > alacritty"
"Set up SSH key > ssh-keygen"
"Add SSH key to agent > ssh-add"
"Login to GitHub > gh auth login"
"Add SSH key to GitHub > gh ssh-key add"
)
for ((i=0; i<${#manual_steps[@]}; i++)); do
echo "${i} - ${manual_steps[i]}"
read -p "Press Enter when done" < /dev/tty
done