-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·71 lines (60 loc) · 1.37 KB
/
install.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#1 /bin/zsh
install_brew() {
echo "Installing brew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
}
install_brew_deps() {
echo "Installing dependencies from brew..."
brew install \
bat \
eza \
fd \
fzf \
gcc \
jq \
make \
neovim \
ripgrep \
stow \
tmux
}
install_nvm() {
echo "Installing nvm..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
}
install_node() {
echo "Installing node..."
nvm install node
}
install_node_deps() {
echo "Installing dependencies from npm..."
npm i -g \
eslint \
tldr
}
install_tpm() {
echo "Installing tpm..."
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
}
stow_dotfiles() {
make stowall
}
install() {
local OS=$(uname -s)
install_brew
if [[ $OS = "Linux" ]]
then
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
fi
install_brew_deps
install_nvm
install_node
install_node_deps
install_tpm
stow_dotfiles
}
install