-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdevbox-setup.sh
More file actions
executable file
·86 lines (62 loc) · 2.37 KB
/
devbox-setup.sh
File metadata and controls
executable file
·86 lines (62 loc) · 2.37 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
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
set -euo pipefail
if ! [[ $(hostname) =~ qa-mydev* ]]; then
# ----- local -----
pay sync --no-sync-loop "$HOME/stripe/dotfiles":/home/jez/.dotfiles
pay ssh 'cd /home/jez/.dotfiles && ./devbox-setup.sh'
exit
fi
# ----- remote -----
(
cd /pay/src/pay-server
git config user.email jez@stripe.com
git config core.commitGraph true
git commit-graph write --reachable
)
if ! [ -d "$HOME/linuxbrew" ]; then
mkdir "$HOME/linuxbrew"
fi
if ! [ -e "/home/linuxbrew" ]; then
ln -s /home/linuxbrew "$HOME/linuxbrew"
fi
if ! [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then
echo 'Installing homebrew'
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
set -x
# Fix zsh compinit warning:
# zsh compinit: insecure directories, run compaudit for list
chmod -R 755 /home/linuxbrew/.linuxbrew/share/zsh
chmod -R 755 /home/linuxbrew/.linuxbrew/share/zsh/site-functions
brew tap thoughtbot/formulae
brew install rcm
mkdir -p "$HOME/.local/bin"
march="$(uname -m)"
case "$march" in
aarch64) ripgrep_libc=gnu;;
x86_64) ripgrep_libc=musl;;
esac
curl -fsSL "https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep-14.1.0-$march-unknown-linux-$ripgrep_libc.tar.gz" | tar --wildcards --strip-components 1 -C "$HOME/.local/bin" -xvz '*/rg'
curl -fsSL "https://github.com/sharkdp/fd/releases/download/v10.1.0/fd-v10.1.0-$march-unknown-linux-musl.tar.gz" | tar --wildcards --strip-components 1 -C "$HOME/.local/bin" -xvz '*/fd'
neovim_march="$march"
if [ "$neovim_march" = "aarch64" ]; then
neovim_march=arm64
fi
curl -fsSL "https://github.com/neovim/neovim/releases/download/v0.11.3/nvim-linux-$neovim_march.tar.gz" | tar --wildcards --strip-components 1 -C "$HOME/.local" -xzv
install_cmd=(install)
# if [ "$march" = "aarch64" ]; then
# install_cmd+=(--build-from-source)
# fi
# One command because brew has parallelism over download step
brew "${install_cmd[@]}" fzf zsh tmux fastmod hub shellcheck
# brew "${install_cmd[@]}" git
# cp /etc/gitconfig /pay/home/linuxbrew/.linuxbrew/etc/gitconfig
cd ~/.dotfiles
RCRC=./rcrc rcup -f -B qa-mydev
# -f to overwrite .profile
# cd ~/.vim/bundle/LanguageClient-neovim
# bash install.sh
# cd -
ln -s ~/.vim ~/.config/nvim
/home/linuxbrew/.linuxbrew/opt/fzf/install --completion --key-bindings --no-update-rc