-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·58 lines (49 loc) · 1.7 KB
/
setup.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
if command -v apt &> /dev/null
then
INSTALL_COMMAND="apt install -y"
elif command -v zypper &> /dev/null
then
INSTALL_COMMAND="zypper install"
elif command -v pacman &> /dev/null
then
INSTALL_COMMAND="pacman -S"
elif command -v xbps-install &> /dev/null
then
INSTALL_COMMAND="xbps-install"
elif command -v dnf &> /dev/null
then
INSTALL_COMMAND="dnf install -y"
elif command -v pkg_add &> /dev/null
then
INSTALL_COMMAND="pkg_add"
elif command -v brew &> /dev/null
then
INSTALL_COMMAND="yum -y install"
else
echo "Unsupported OS"
exit -1
fi
mkdir -p ~/.config/kitty
mkdir -p ~/.config/sheldon
cp ./plugins.toml ~/.config/sheldon/plugins.toml
cp tmux.conf ~/.tmux.conf
command sudo ${INSTALL_COMMAND} zsh
command sudo ${INSTALL_COMMAND} curl
command sudo ${INSTALL_COMMAND} git
RUNZSH=no sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended"
curl --proto '=https' -fLsS https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo rossmacarthur/sheldon --to ~/.local/bin
echo 'eval "$(sheldon source)"' >> ~/.zshrc
echo -e "export PATH=\$HOME/.local/bin:\$PATH\n$(cat ~/.zshrc)" > ~/.zshrc
command sudo ${INSTALL_COMMAND} tmux
if ! command -v chsh &> /dev/null
then
command sudo ${INSTALL_COMMAND} util-linux-user || echo "You will need to manually change the shell to tmux"
fi
if command -v chsh &> /dev/null
then
command sudo chsh -s $(which tmux) $USER
fi
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin && sudo ln -s $HOME/.local/kitty.app/bin/kitty $HOME/.local/bin/kitty
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
bash -c "~/.tmux/plugins/tpm/bindings/install_plugins" > /dev/null