-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase_system
executable file
·134 lines (112 loc) · 3.79 KB
/
base_system
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#! /bin/bash
current_dir=$(pwd)
# Check if GIT_PATH is already set
if [ -z "$GIT_PATH" ]; then
read -p "Do you want to create a default location for git repositories? (y/n) " create_git_dir
if [[ $create_git_dir =~ ^[Yy]$ ]]; then
read -p "Enter the path for git repositories (default: $HOME/git): " git_path
GIT_PATH=$git_path
export GIT_PATH
if [ ! -d "$GIT_PATH" ]; then
mkdir -p "$GIT_PATH"
echo "Created git directory at $GIT_PATH"
else
echo "Git directory already exists at $GIT_PATH"
fi
else
echo "Skipping git directory creation."
fi
else
echo "GIT_PATH is already set to $GIT_PATH"
fi
# Determine the operating system
if [ -f /etc/os-release ]; then
. /etc/os-release
OS=$NAME
elif type lsb_release >/dev/null 2>&1; then
OS=$(lsb_release -si | grep -v "No LSB modules are available." | head -n1)
else
OS=$(uname -s)
fi
# Update and upgrade
echo "Running update and upgrade"
if [[ "$OS" == "Ubuntu" || "$OS" == "Debian GNU/Linux" ]]; then
sudo apt update && sudo apt upgrade
elif [[ "$OS" == "Arch Linux" ]]; then
sudo pacman -Syu
elif [[ "$OS" == "Rocky Linux" ]]; then
sudo dnf upgrade
else
echo "Unsupported operating system: $OS"
exit 1
fi
# Install base libraries
echo "Install base libraries"
if [[ "$OS" == "Ubuntu" || "$OS" == "Debian GNU/Linux" ]]; then
sudo apt install tar tree tldr trash-cli unzip make jq lxappearance papirus-icon-theme \
fonts-noto-color-emoji lm-sensors thunar x11-xserver-utils pavucontrol xdg-utils xinput rofi wget gh \
libasound2-plugins libasound2-doc alsa-oss alsamixergui apulse locate krita gimp \
qt5ct qt5-style-kvantum gedit vlc
elif [[ "$OS" == "Arch Linux" ]]; then
sudo pacman -S --needed tar tree tldr trash-cli unzip make jq lxappearance papirus-icon-theme \
noto-fonts-emoji lm_sensors thunar xorg-apps pavucontrol xdg-utils xorg-xinput rofi wget github-cli \
alsa-plugins alsa-utils alsa-oss alsa-firmware mlocate krita gimp qt5ct kvantum-qt5 fastfetch openssh gedit \
bash-completion vlc tumbler jpegoptim
# Ask user if they want to install yay
read -p "Do you want to install yay (AUR helper)? (y/n) " install_yay
if [[ $install_yay =~ ^[Yy]$ ]]; then
echo "Installing yay..."
./install_yay
else
echo "Skipping yay installation."
fi
elif [[ "$OS" == "Rocky Linux" ]]; then
sudo dnf install tar tree tldr trash-cli dbus-devel gcc git libconfig-devel libdrm-devel libev \
libX11-devel libX11-xcb libXext-devel libxcb-devel libGL-devel libEGL-devel libepoxy-devel meson ninja-build \
pcre2-devel pixman-devel xcb-util-image-devel xcb-util-renderutil-devel xorg-x11-proto-devel gedit \
xcb-util-devel cmake libXft-devel imlib2-devel libXinerama-devel libxcb-devel alsa-utils uthash-devel vlc
else
echo "Unsupported operating system: $OS"
exit 1
fi
./install_fonts
# Ask user about desktop environment
echo "Which desktop environment would you like to install?"
echo "1) DWM"
echo "2) Hyprland"
echo "3) MATE"
echo "4) KDE"
echo "5) None"
read -p "Enter your choice (1/2/3/4/5): " de_choice
case $de_choice in
1)
./install_dwm
;;
2)
./install_hyprland
;;
3)
./install_mate_desktop
;;
4)
./install_plasma_desktop
;;
5)
echo "Skipping desktop environment installation."
;;
*)
echo "Invalid choice. Skipping desktop environment installation."
;;
esac
cd $current_dir
./install_display_manager
./install_starship
./clone_dotconfig
./install_tokyo_nights_theme
./setup_qt
cd $current_dir
./install_web_browser
./install_steam
./setup_nfs_drives
cd $current_dir
echo "Setup is now completed, please reboot your system."