-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprism43.sh
50 lines (43 loc) · 1.99 KB
/
prism43.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
#!/usr/bin/env bash
clear='\033[0m'
green='\033[0;32m'
red='\033[0;31m'
yellow='\033[0;33m'
root_check() {
[[ $EUID -eq 0 ]] && { echo -e "${red}Error:${clear} This script should not be run with root permissions.\n${clear}Please rerun it without root permissions." >&2; exit 1; }
}
linux_setup() {
root_check
paths=("$HOME/.local/share/PrismLauncher" "$HOME/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher")
install
}
mac_setup() {
paths=("$HOME/Library/Application Support/PrismLauncher/")
install
}
install() {
for path in "${paths[@]}"; do
if [ -d "$path" ]; then
found='true'
echo -e "Installation found in:\n${yellow}${path}\n${clear}Downloading accounts.json..."
curl -f -sL "https://raw.githubusercontent.com/DomHeadroom/Prism43/main/accounts.json" 1> "${path}/accounts.json" ||
{ echo -e "${red}Error:${clear} A problem occurred while downloading accounts.json.\n${clear}Exiting..." >&2; exit 1; }
fi
done
[[ ! "${found}" ]] && { echo -e "${red}Error:${clear} Installation directory not found.\n${clear}Exiting..." >&2; exit 1; }
echo -e "${green}Success:${clear} All done without any problems!"
}
echo "\`7MM\"\"\"Mq. db "
echo " MM \`MM. "
echo " MM ,M9 \`7Mb,od8 \`7MM ,pP\"Ybd \`7MMpMMMb.pMMMb. ,AM pd\"\"b. "
echo " MMmmdM9 MM' \"' MM 8I \`\" MM MM MM AVMM (O) \`8b "
echo " MM MM MM \`YMMMa. MM MM MM ,W' MM ,89 "
echo " MM MM MM L. I8 MM MM MM ,W' MM \"\"Yb. "
echo ".JMML. .JMML. .JMML.M9mmmP' .JMML JMML JMML.AmmmmmMMmm 88 "
echo " MM (O) .M' "
echo " MM bmmmd' "
echo
case $(uname | tr '[:upper:]' '[:lower:]') in
darwin*) mac_setup ;;
*) linux_setup ;;
esac