-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-main.sh
executable file
·80 lines (67 loc) · 3.15 KB
/
install-main.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
#!/bin/bash
if (( $(id -u) != 0 )); then
echo "This script needs to be run as root."
exit 1
fi
echo "This will overwrite some of the files in your system."
echo "USE WITH CAUTION!"
read -r -p "Do you want to install AstolfOS? (y/n) " install
if [ "$install" != "y" ]; then
echo "Aborting installation..."
exit 1
fi
if ! [ -x "$(command -v curl)" ]; then
echo "curl is not installed. Install?"
read -r install
if [ "$install" == "y" ]; then
sudo apt update
sudo apt install curl
else
echo "Aborting installation..."
exit 1
fi
fi
sudo mkdir /opt/AstolfOS
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/logo.png -o /opt/AstolfOS/logo.png
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/os-release -o /etc/os-release
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/kcm-about-distrorc -o /etc/xdg/kcm-about-distrorc
echo "Installed core components"
if [ -f "/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/splash/images/busywidget.svgz" ]; then
echo "Installing KDE splash 1/2..."
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/kde-splash/busywidget.svgz -o /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/splash/images/busywidget.svgz
else
echo "Skipping KDE splash installation 1/2..."
fi
if [ -f "/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/splash/images/plasma.svgz" ]; then
echo "Installing KDE splash 2/2..."
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/kde-splash/plasma.svgz -o /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/splash/images/plasma.svgz
else
echo "Skipping KDE splash installation 2/2..."
fi
if [ -f "/usr/share/pixmaps/ubuntu-logo-dark.png" ]; then
echo "Overwriting GNOME Ubuntu dark logo..."
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/logo.png -o /usr/share/pixmaps/ubuntu-logo-dark.png
else
echo "Skipping GNOME Ubuntu logo overwrite..."
fi
if [ -f "/usr/share/pixmals/ubuntu-logo-icon.png" ]; then
echo "Overwriting GNOME Ubuntu icon..."
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/logo.png -o /usr/share/pixmaps/ubuntu-logo-icon.png
else
echo "Skipping GNOME Ubuntu icon overwrite..."
fi
if [ -f "/usr/share/plymouth/ubuntu-logo.png" ]; then
echo "Overwriting Plymouth Ubuntu logo..."
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/logo.png -o /usr/share/plymouth/ubuntu-logo.png
else
echo "Skipping Plymouth Ubuntu logo overwrite..."
fi
if [ "$(command -v neofetch)" ]; then
sudo curl https://raw.githubusercontent.com/ProgrammerAstolfo/AstolfOS/master/files/ascii-art.txt -o /opt/AstolfOS/ascii-art.txt
fi
read -r -p "Disable splash screen in GRUB? (y/n) " disable
if [ "$disable" == "y" ]; then
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash"/g' /etc/default/grub
sudo update-grub
fi
echo "Finished installation. "