-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-linux
executable file
·68 lines (50 loc) · 1.39 KB
/
install-linux
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
#!/usr/bin/env bash
packages="zsh tmux emacs neovim firefox mpv sxiv virt-manager mpd sxhkd feh cinnamon fzf aerc xclip weechat unzip zathura python3 curl ripgrep"
debian_packages="${packages} build-essential golang"
arch_packages="${packages} go gcc make cmake ninja gnome-keyring ghostty"
mint_setup(){
echo "Setting up for Linux Mint..."
sudo add-apt-repository ppa:neovim-ppa/stable
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install $debian_packages
}
debian_setup(){
echo "Setting up for Debian..."
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install $debian_packages
}
archlinux_setup() {
echo "Setting up for Arch Linux..."
sudo pacman -Syu
sudo pacman -S $arch_packages
systemctl enable --user gcr-ssh-agent.socket
}
configure_zsh(){
echo "Configuring zsh..."
if [ "$SHELL" != $(which zsh) ]; then
chsh -s "$(which zsh)"
fi
if [ ! -d "$HOME/.zplug" ]; then
echo "Installing zplug..."
git clone https://github.com/zplug/zplug "$HOME/.zplug"
fi
}
distro=$(grep '^ID' /etc/os-release | cut -d '=' -f 2)
case $distro in
[Ll]inux[Mm]int)
mint_setup
;;
[Dd]ebian)
debian_setup
;;
[Aa]rch)
archlinux_setup
;;
esac
configure_zsh
./setup-home
./configure-applications
./create-symlinks