-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconvert.sh
More file actions
136 lines (130 loc) · 4.55 KB
/
convert.sh
File metadata and controls
136 lines (130 loc) · 4.55 KB
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
136
#!/bin/bash
echo "Checking to see if we are root..."
if [ "$EUID" -ne 0 ]; then
echo -e "\e[35mError: You are not root! Make sure you are running the script with sudo."
exit
else
echo "- The script is running as root"
fi
echo "Making sure we are running on an Arch-based distribution..."
if [ -f "/etc/arch-release" ]; then
echo "- The distribution is Arch-based or Arch itself"
else
echo -e "\e[35mError: This distribution isn't Arch!"
fi
echo -e "\e[34m /// "
echo -e "\e[34m ,////////////// "
echo -e "\e[34m /////////////////////////////// "
echo -e "\e[34m ///////////////***********////// "
echo -e "\e[34m ////***********************///// "
echo -e "\e[34m /////***********************//// "
echo -e "\e[34m //////,,,,,,,,,,,,,,,,,,,,,,/// "
echo -e "\e[34m ******,,,,,,,,,,,,,,,,,,,,,,,,,***** "
echo -e "\e[34m *****,,,,,,,,,,,,,,,,,,,,,,,,,,,,*****"
echo -e "\e[36m *****,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*****"
echo -e "\e[36m ******,,,,,,,,,,,,,,,,,,,,,,,,,,,,*****"
echo -e "\e[36m *******,,,,,,,,,,,,,,,,,,,,,,,,,******"
echo -e "\e[36m *******......................*******"
echo -e "\e[36m ******....***********************"
echo -e "\e[36m **************************** "
echo -e "\e[36m ***** "
echo -e "\e[0m"
echo -e "Welcome to the \e[34mCobalt Linux\e[0m Migration Script!"
echo "This script will migrate an existing Arch installation into Cobalt."
echo "Continue? (y/n)"
read input
if [[ $input != "y" ]]; then
echo "Exiting..."
exit
fi
echo "Select your Desktop Environment:"
echo "1. Pantheon"
echo "2. Cutefish"
echo "3. Budgie"
read desktop
if [[ $desktop == "1" ]]; then
export desktop="pantheon"
elif [[ $desktop == "2" ]]; then
export desktop="cutefish"
elif [[ $desktop == "3" ]]; then
export desktop="budgie"
else
echo "Invalid choice. Defaulting to Pantheon... (If you do not want to use this desktop, press CTRL+C now to exit the program.)"
sleep 5
export desktop="pantheon"
fi
if [[ $desktop == "pantheon" ]]; then
echo "Converting your Arch install to Cobalt Linux Azurite (Pantheon Edition)..."
pacman -Syyu --noconfirm pantheon lightdm pantheon-default-settings lightdm-pantheon-greeter switchboard elementary-icon-theme elementary-wallpapers gtk-theme-elementary ttf-droid ttf-opensans ttf-roboto sound-theme-elementary gnome-software gnome-software-packagekit-plugin git
systemctl enable lightdm
elif [[ $desktop == "cutefish" ]]; then
echo "Converting your Arch install to Cobalt Linux Azurite (Cutefish Edition)..."
pacman -Syyu --noconfirm cutefish sddm git
systemctl enable sddm
elif [[ $desktop == "budgie" ]]; then
echo "Converting your Arch install to Cobalt Linux Azurite (Budgie Edition)..."
pacman -Syyu --noconfirm git budgie-desktop budgie-desktop-view budgie-screensaver budgie-extras gdm
systemctl enable gdm
else
echo -e "\e[35mError during desktop install: The desktop environment variable $desktop is not a valid choice! Exiting..."
exit
fi
echo "Install an AUR helper?"
echo "(y/n)"
read aurhelper
if [[ $aurhelper == "y" ]]; then
export aurinstall="true"
else
export aurinstall="false"
fi
if [[ $aurinstall == "true" ]]; then
echo "Select an AUR helper to install:"
echo "1. Paru"
echo "2. Yay"
echo "3. Pikaur"
read aurhelper
if [[ $aurhelper == "1" ]]; then
export aurhelper="paru"
elif [[ $aurhelper == "2" ]]; then
export aurhelper="yay"
elif [[ $aurhelper == "3" ]]; then
export aurhelper="pikaur"
else
echo "Invalid choice. Defaulting to yay..."
export aurhelper="yay"
fi
fi
if [[ $aurhelper == "paru" ]]; then
echo "Installing Paru..."
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
cd ../
rm -rf paru
elif [[ $aurhelper == "yay" ]]; then
echo "Installing Yay..."
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ../
rm -rf yay
elif [[ $aurhelper == "pikaur" ]]; then
echo "Installing Pikaur..."
git clone https://aur.archlinux.org/pikaur.git
cd pikaur
makepkg -fsri
cd ../
rm -rf pikaur
else
echo -e "\e[35mError during AUR helper install: the aurhelper variable $aurhelper is not valid! Exiting..."
exit
fi
echo "Topping off some finishing touches..."
pacman -S --noconfirm neofetch neovim vlc fluidsynth
echo "Swapping out Arch Linux branding for Cobalt Linux branding..."
sed -i 's/Arch Linux/Cobalt Linux/g' /etc/os-release
sed -i 's/Arch Linux/Cobalt Linux/g' /etc/lsb_release
sed -i 's/Arch Linux/Cobalt Linux/g' /etc/issue
echo "Cobalt Linux has been installed! We will reboot the computer in 20 seconds to complete the changes."
sleep 20
reboot