-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·135 lines (125 loc) · 4.47 KB
/
install.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
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
135
#!/usr/bin/env bash
# NEVER RUN THIS SCRIPT AS ROOT!!!
if [ $UID -eq 0 ]; then
echo "This script should not be run as root. Please run it as a normal user."
exit 1
fi
# Function to check if a file exists and is readable
check_file() {
if [ ! -f "$1" ] || [ ! -r "$1" ]; then
echo "File $1 does not exist or is not readable. Exiting."
exit 1
fi
}
main() {
local source_tools="./scripts/tools"
local source_install="./scripts/install"
local source_setup="./scripts/setup"
local scripts=(
"${source_tools}/update.sh"
"${source_install}/base.sh"
"${source_install}/code.sh"
"${source_install}/gnome.sh"
"${source_install}/gpu.sh"
"${source_install}/python_mlai.sh"
"${source_install}/python_poetry.sh"
"${source_install}/chrome.sh"
"${source_install}/steam.sh"
"${source_install}/spotify.sh"
"${source_setup}/neovim.sh"
"${source_setup}/nvm.sh"
"${source_setup}/tmux.sh"
"${source_setup}/yay.sh"
"${source_setup}/zsh.sh"
)
# Source install scripts
for script in "${scripts[@]}"; do
check_file "$script"
source "${script}"
done
echo "Please select an option:"
echo "Press enter on an empty line to redisplay the options."
local options=(
"update: Update the base system"
"base: Install C, C++, Rust, Lua, Node, Python, base tools, and fonts"
"yay: Install and setup AUR package manager"
"zsh: Install and setup Zsh installation"
"tmux: Install and setup Tmux installation"
"neovim: Install and setup NeoVim text editor"
"poetry: Install and configure Poetry virtual environment"
"intel: Install Intel GPU drivers, OpenCL, and Vulkan"
"nvidia: Install Nvidia GPU drivers, OpenCL, Vulkan, and CUDA"
"amd: Install AMD GPU drivers, OpenCL, Vulkan, and ROCm"
"gnome: Install Gnome desktop environment and shell extensions"
"code: Install Visual Studio Code text editor"
"chrome: Install Google Chrome web browser"
"spotify: Install Spotify music streaming client"
"steam: Install Steam gaming platform"
"xboxdrv: Install input controller device support"
"nvm: Install and setup Node Version Manager"
"quit: Exit the script"
)
select option in "${options[@]}"; do
case $option in
"update: Update the base system")
pacman_system_update
;;
"base: Install C, C++, Rust, Lua, Node, Python, base tools, and fonts")
install_base
;;
"yay: Install and setup AUR package manager")
setup_yay
;;
"zsh: Install and setup Zsh installation")
setup_zsh
;;
"tmux: Install and setup Tmux installation")
setup_tmux
;;
"neovim: Install and setup NeoVim text editor")
setup_neovim
;;
"poetry: Install and configure Poetry virtual environment")
install_python_poetry
;;
"intel: Install Intel GPU drivers, OpenCL, and Vulkan")
install_intel
;;
"nvidia: Install Nvidia GPU drivers, OpenCL, Vulkan, and CUDA")
install_nvidia
;;
"amd: Install AMD GPU drivers, OpenCL, Vulkan, and ROCm")
install_amd
;;
"gnome: Install Gnome desktop environment and shell extensions")
install_gnome
;;
"code: Install Visual Studio Code text editor")
install_vscode
;;
"chrome: Install Google Chrome web browser")
install_google_chrome
;;
"spotify: Install Spotify music streaming client")
install_spotify
;;
"steam: Install Steam gaming platform")
install_steam
;;
"xboxdrv: Install input controller device support")
install_xboxdrv
;;
"nvm: Install and setup Node Version Manager")
setup_nvm
;;
"quit: Exit the script")
break
;;
*)
echo "Invalid option $REPLY"
;;
esac
done
echo "Done."
}
main