-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
79 lines (68 loc) · 2.11 KB
/
init.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
# Ensure home is where the heart is
echo "XDG_CONFIG_HOME=$HOME" >> ~/.profile
if [ $(uname) == "Darwin"]; then
xcode-select --install
fi
if [ $(uname) == "Linux"]; then
apt-get update && apt-get install git gcc clang -y
fi
# Install Homebrew (slow, but maybe keeps everything else simpler)
if ! command brew -v &> /dev/null
then
if [ $(uname -m) == "arm64" ] && [ $(uname) == "Linux"]; then
echo "Homebrew is not yet supported on ARM Linux :("
else
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Installing all the things..."
brew install \
alacritty \
neovim \
tmux \
asciidoctor \
bat \
pyvenv \
node \
fzf \
ripgrep \
pyenv \
rbenv \
ruby-build \
node \
wget \
curl \
sass/sass/sass \
luarocks \
# go # this is actually a shit way to install go on the pi, btw
fi
fi
# install omzsh
echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Grab some fonts
echo "Pulling down our terminal font..."
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/IBMPlexMono.zip
echo "Moving config files..."
case $($0) in
"/bin/zsh")
cp ~/.config/vim/.vimrc ~
cp ~/.config/omzsh/.zshrc ~
cp ~/.config/omzsh/.zsh_aliases ~
cp ~/.config/omzsh/.bash_aliases ~ # just in case
cp -v ~/.config/omzsh/custom_themes/refined.zsh-theme ~/.oh-my-zsh/custom/themes
;;
esac
# install luacheck so we can work on files
luarocks install luacheck
# install some language serves we need to install via npm
npm i -g vscode-langservers-extracted \
@tailwindcss/language-server \
bash-language-server
# install rust (this may go away)
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
# global gitignore
git config --global core.excludesFile '~/.gitignore'
# global git aliases
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status