-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·102 lines (97 loc) · 4.45 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env bash
# GitHub codespaces setup.
function link_files() {
mkdir -p ~/.config
ln -sf $(pwd)/tmux.conf ~/.tmux.conf
if [ -e ~/.gitconfig ]; then
rm ~/.gitconfig
fi
ln -s $(pwd)/gitconfig ~/.gitconfig
ln -sf $(pwd)/gitignore_local ~/.gitignore_local
if [ -e ~/.config/fish ]; then
rm -rf ~/.config/fish
fi
ln -sf $(pwd)/fish ~/.config/
ln -sf $(pwd)/starship.toml ~/.config/
ln -sf $(pwd)/nvim ~/.config/
ln -sf $(pwd)/bat ~/.config/
ln -sf $(pwd)/vale.ini ~/.vale.ini
ln -sf $(pwd)/prettierrc.json ~/.config/prettierrc.json
ln -sf $(pwd)/gitmux.conf ~/.config/gitmux.conf
ln -sf $(pwd)/tmuxinator ~/.config/tmuxinator
ln -sf $(pwd)/neofetch ~/.config/neofetch
ln -sf $(pwd)/atuin ~/.config/atuin
ln -sf $(pwd)/yazi ~/.config/yazi
ln -sf $(pwd)/bottom ~/.config/bottom
if [ -d /workspaces/github ]; then
sudo ln -sf /workspaces/github/bin/rubocop /usr/local/bin/rubocop
sudo ln -sf /workspaces/github/bin/srb /usr/local/bin/srb
sudo ln -sf /workspaces/github/bin/bundle /usr/local/bin/bundle
sudo ln -sf /workspaces/github/bin/solargraph /usr/local/bin/solargraph
sudo ln -sf /workspaces/github/bin/safe-ruby /usr/local/bin/safe-ruby
sudo update-locale LANG=en_US.UTF-8 LC_TYPE=en_US.UTF-8 LC_ALL=en_US.UTF-8
fi
}
function install_software() {
if [ -d /workspaces/github ]; then
sleep 20
sudo apt -o DPkg::Lock::Timeout=600 install build-essential python3-venv socat ncat ruby-dev jq thefuck tmux libfuse2 fuse software-properties-common most -y
sudo apt remove bat ripgrep -y
curl -sS https://starship.rs/install.sh | sudo sh -s -- -y
# sudo apt-get install -y ca-certificates curl gnupg
# sudo mkdir -p /etc/apt/keyrings
# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# NODE_MAJOR=20
# echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
# sudo apt-get update
# sudo apt-get install -y nodejs
curl -L https://github.com/dandavison/delta/releases/download/0.18.2/git-delta-musl_0.18.2_amd64.deb > ~/git-delta-musl_0.18.2_amd64.deb
sudo dpkg -i ~/git-delta-musl_0.18.2_amd64.deb
wget --output-document ~/.config/delta-themes.gitconfig https://raw.githubusercontent.com/dandavison/delta/master/themes.gitconfig
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -L $PB_REL/download/v25.1/protoc-25.1-linux-x86_64.zip > ~/protoc.zip
unzip ~/protoc.zip -d $HOME/.local
export PATH="$PATH:$HOME/.local/bin"
cargo install eza
cargo install zoxide --locked
cargo install ripgrep
cargo install fd-find
cargo install bat --locked
cargo install atuin
go install github.com/arl/gitmux@latest
sudo gem install tmuxinator neovim-ruby-host
npm install -g @fsouza/prettierd yaml-language-server vscode-langservers-extracted eslint_d prettier tree-sitter neovim
curl -L https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.fish > ~/.config/fish/completions/
~/.cargo/bin/bat cache --build
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
fi
}
function setup_software() {
echo "Log in to atuin"
~/.cargo/bin/atuin login -u $ATUIN_USERNAME -p $ATUIN_PASSWORD -k $ATUIN_KEY
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
~/.tmux/plugins/tpm/scripts/install_plugins.sh
echo "TMUX plugins installed" >> ~/install.log
echo `date +"%Y-%m-%d %T"` >> ~/install.log;
nvim --headless "+Lazy! sync" +qa
nvim --headless /tmp/tmp "+MasonToolsInstallSync" +qa
echo "NVIM plugins installed" >> ~/install.log
echo `date +"%Y-%m-%d %T"` >> ~/install.log;
if [ -d /workspaces/github ]; then
sudo chsh -s /usr/bin/fish vscode
cd /workspaces/github
git status
fi
}
echo '🔗 Linking files.' >> ~/install.log;
echo `date +"%Y-%m-%d %T"` >> ~/install.log;
link_files
echo '💽 Installing software' >> ~/install.log;
echo `date +"%Y-%m-%d %T"` >> ~/install.log;
install_software
echo '👩<200d>🔧 configure software' >> ~/install.log;
echo `date +"%Y-%m-%d %T"` >> ~/install.log;
setup_software
echo '✅ Done!' >> ~/install.log;
echo `date +"%Y-%m-%d %T"` >> ~/install.log;