-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fedora_migration.sh
executable file
·62 lines (41 loc) · 1.21 KB
/
fedora_migration.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
#! /usr/bin/env bash
cd /tmp
echo_red_text() {
echo -e "\033[31m$1\033[0m"
}
echo_green_text() {
echo -e "\033[32m$1\033[0m"
}
error_fn() {
echo
echo -e "\033[31mSomething went wrong! The script failed.\033[0m"
echo
exit 1
}
if [ $(id --user) -ne 0 ]; then
echo_red_text "You must run this script with sudo"
echo
exit 1
fi
echo_green_text "Downloading new mozilla.cfg"
wget -nv https://phoenix.celenity.dev/mozilla.cfg || error_fn
echo
echo_green_text "Overwriting old mozilla.cfg with new mozilla.cfg"
sudo mv -v mozilla.cfg /usr/lib64/firefox/mozilla.cfg || error_fn
echo
echo_green_text "Uninstalling the old phoenix-policies package"
sudo dnf remove phoenix-policies || error_fn
echo
echo_green_text "Removing the old Phoenix-Policies COPR Repo"
sudo dnf copr remove retold3202/Phoenix-Policies || error_fn
echo
echo_green_text "Adding new Phoenix-Policies COPR Repo to DNF"
sudo dnf copr enable celenity/phoenix-policies || error_fn
echo
echo_green_text "Updating DNF cache"
sudo dnf update --refresh || error_fn
echo
echo_green_text "Installing phoenix-policies package"
sudo dnf install phoenix-policies || error_fn
echo
echo_gree_text "Thank you for taking the time to run our migration script. Enjoy :)"