-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
upgrade.sh
executable file
·68 lines (58 loc) · 1.67 KB
/
upgrade.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
#!/bin/bash
## Downloaded files save in /tmp
cd /tmp
## Colours
blue='\e[1;34m';
brown='\e[0;33m';
coloroff='\e[0m'; # Colour off
cyan='\e[1;36m';
gray='\e[1;30m';
green='\e[0;32m';
purple='\e[0;35m';
red='\e[1;31m';
## Download and run upgrade script
upgrade_phoenix() {
wget -nv $1
echo
echo
sudo bash $2
}
## Scripts are here
URL="https://phoenix.celenity.dev/upgrade_scripts"
## Scripts file
SCRIPT=("arch_upgrade_paru.sh"
"arch_upgrade_yay.sh"
"fedora_upgrade.sh"
"macos_upgrade.sh")
echo -e "${purple}Thank you for upgrading to the 'New' Phoenix!${coloroff}";
echo -e "";
echo -e "${brown}To begin, please choose your platform.${coloroff}";
echo -e "${brown}Your options are:${coloroff}";
echo -e "${cyan}arch${coloroff} - ${green}Arch Linux (AUR)${coloroff}";
echo -e "${blue}fedora${coloroff} - ${green}Fedora Linux${coloroff}";
echo -e "${gray}macOS${coloroff} - ${green}macOS${coloroff}";
read -p 'Enter your selection: ' DISTRO
case ${DISTRO} in
"arch" | "Arch" | "ARCH")
echo -e "";
echo -e "${brown}Please choose your AUR helper.${coloroff}";
echo -e "${brown}Your options are:${coloroff}";
echo -e "${blue}paru${coloroff} - ${green}Paru${coloroff}";
echo -e "${red}yay${coloroff} - ${green}Yay (Yet Another Yogurt)${coloroff}";
read -p 'Enter your selection: ' HELPER
case ${HELPER} in
"paru" | "Paru" | "PARU")
upgrade_phoenix ${URL}/${SCRIPT[0]} ${SCRIPT[0]}
;;
"yay" | "Yay" | "YAY")
upgrade_phoenix ${URL}/${SCRIPT[1]} ${SCRIPT[1]}
;;
esac
;;
"fedora"| "Fedora" | "FEDORA")
upgrade_phoenix ${URL}/${SCRIPT[3]} ${SCRIPT[3]}
;;
"macOS" | "macos" | "MacOS" | "MACOS")
upgrade_phoenix ${URL}/${SCRIPT[4]} ${SCRIPT[4]}
;;
esac