-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.wsl.sh
67 lines (56 loc) · 1.23 KB
/
bootstrap.wsl.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
#!/usr/bin/env zsh
set -efu -o pipefail
# system-level upgrades and cleanup
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y autoremove
sudo apt-get -y install build-essential
# ensure homebrew is installed
if ! command -v brew > /dev/null; then
local brew_bin=/home/linuxbrew/.linuxbrew/bin
if [[ ! -x $brew_bin/brew ]]; then
title "Installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
local homebrew_env=$($brew_bin/brew shellenv)
eval "$homebrew_env"
if [[ ! -e "$HOME/.zshrc" ]] || ! grep -Fxq "# Homebrew" "$HOME/.zshrc"; then
cat <<EOF > "$HOME/.zshrc"
#
# Homebrew
#
$homebrew_env
EOF
fi
fi
local brewlist=$(brew list)
install() {
if ! echo $brewlist | grep -Fxq "${2:-$1}"; then
echo
HOMEBREW_NO_AUTO_UPDATE=1 brew install "$1"
fi
}
install gcc
install antibody
install awscli
install bat
install chruby
install dust
install eza
install fd
install fzf
install git
install go
install jq
install neovim
install node
install node@18
install openjdk && brew link openjdk --force
install pstree
install redis
install ripgrep
install ruby
install sd
install tree
install yarn
install zsh