-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_vim
executable file
·66 lines (51 loc) · 1.58 KB
/
setup_vim
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 bash
echo "Github:- https://github.com/DTan13"
echo "Reddit:- https://reddit.com/u/DTan13"
echo "Telegram:- https://t.me/DTan13"
if [ "$(command -v apt)" ]; then
echo "apt is installed"
echo "Installing packages using apt"
sudo apt install -y zsh vim
curl -sLf https://spacevim.org/install.sh | bash
echo "Installing starship"
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
echo "Updating dotfiles"
cd ~
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply DTan13
~/bin/chezmoi apply
cd -
echo "Changing default shell"
sudo chsh $(whoami) -s $(which zsh)
elif [ "$(command -v pacman)" ]; then
echo "pacman is installed"
echo "Installing packages using pacman"
sudo pacman -Sy --noconfirm zsh vim
curl -sLf https://spacevim.org/install.sh | bash
echo "Installing starship"
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
echo "Updating dotfiles"
cd ~
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply DTan13
~/bin/chezmoi apply
cd -
echo "Changing default shell"
sudo chsh $(whoami) -s $(which zsh)
elif [ "$(command -v yum)" ]; then
echo "yum is installed"
echo "Installing packages using yum"
sudo yum install -y zsh vim
curl -sLf https://spacevim.org/install.sh | bash
echo "Installing starship"
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
echo "Updating dotfiles"
cd ~
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply DTan13
~/bin/chezmoi apply
cd -
echo "Changing default shell"
sudo chsh $(whoami) -s $(which zsh)
else
echo "unable to find apt, pacman or yum"
fi
echo "Everything done."
echo "Restart the shell"