-
Notifications
You must be signed in to change notification settings - Fork 0
/
Setup.sh
129 lines (111 loc) · 3.22 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
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
#!/bin/bash
# Check distribution
if [ -f /etc/arch-release ]; then
package_manager="pacman"
aur_helper="yay"
else
package_manager="apt"
aur_helper=""
fi
# Welcome message and installation overview
echo "Welcome! This script will install various software packages on your system."
echo "You can choose to install the WiFi driver optionally."
# Update the package index
clear
if [ "$package_manager" = "apt" ]; then
sudo apt update
else
sudo pacman -Syu
fi
# Add the PPA for NVIDIA drivers if on Ubuntu
if [ "$package_manager" = "apt" ]; then
clear
sudo add-apt-repository ppa:graphics-drivers/ppa
fi
# Install Floorp from the PPA or AUR
clear
if [ "$package_manager" = "apt" ]; then
curl -fsSL https://ppa.ablaze.one/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/Floorp.gpg
sudo curl -sS --compressed -o /etc/apt/sources.list.d/Floorp.list 'https://ppa.ablaze.one/Floorp.list'
sudo apt update
sudo apt install floorp
else
$aur_helper -S floorp-bin
fi
# Install VSCode
if [ "$package_manager" = "apt" ]; then
sudo apt install code
else
$aur_helper -S visual-studio-code-bin
fi
# Update the package index again
clear
if [ "$package_manager" = "apt" ]; then
sudo apt update
else
sudo pacman -Syu
fi
# Install the latest Nvidia Drivers
clear
if [ "$package_manager" = "apt" ]; then
sudo apt install nvidia-driver-545
else
sudo pacman -S nvidia
fi
# Prompt for WiFi driver installation
read -p "Do you want to install the WiFi driver? (y/N): " install_wifi
# Install WiFi driver if chosen
if [[ $install_wifi =~ ^[Yy]$ ]]; then
# Create directory, clone repository, and install dependencies
sudo mkdir -p ~/src
cd ~/src
git clone https://github.com/morrownr/rtl8852bu.git
if [ "$package_manager" = "apt" ]; then
sudo apt install -y build-essential dkms git iw gcc-12
else
sudo pacman -S base-devel dkms iw gcc
fi
# Install the driver
cd rtl8852bu
sudo ./install-driver.sh
# Confirm installation
echo "WiFi driver installation completed!"
fi
# Install OpenShot Video Editor
if [ "$package_manager" = "apt" ]; then
sudo add-apt-repository ppa:openshot.developers/ppa
sudo apt update
sudo apt install openshot-qt python3-openshot
else
$aur_helper -S openshot
fi
# Install Steam
cd ~
cd Downloads
mkdir installation_files
cd installation_files
wget https://cdn.akamai.steamstatic.com/client/installer/steam.deb
if [ "$package_manager" = "apt" ]; then
sudo dpkg -i steam.deb
else
sudo pacman -S steam
fi
# Install Scrcpy dependencies and Scrcpy
if [ "$package_manager" = "apt" ]; then
sudo apt install ffmpeg libsdl2-2.0-0 adb wget gcc git pkg-config meson ninja-build libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
else
sudo pacman -S ffmpeg sdl2 adb wget
fi
# Install Scrcpy from source instead of packaged version stated in Scrcpy repo readme
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
./install_release.sh
# Install Raspberry Pi Imager
clear
if [ "$package_manager" = "apt" ]; then
sudo apt install rpi-imager
else
$aur_helper -S rpi-imager
fi
# Final message
echo "All desired software packages have been installed! Please reboot your system to ensure everything has been successfully installed!"