-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathemus_config.sh
62 lines (49 loc) · 1.7 KB
/
emus_config.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
#!/bin/sh
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
UNDERLINE='\033[4m'
BLINK='\x1b[5m'
handheldModel=$(cat ~/dragoonDoriseTools/.device)
if [ $handheldModel == "ODIN" ]; then
hasDuckstation=false
hasDolphinMMJ=false
FOLDER=~/storage/shared/dolphin-mmjr
if [ -d "$FOLDER" ]; then
hasDolphinMMJ=true
fi
FOLDER=~/storage/shared/duckstation
if [ -d "$FOLDER" ]; then
hasDuckstation=true
fi
echo -ne "Creating Dolphin Backup..."
#We create the backup only if we don't have one, to prevent erasing the original backup if the user reinstalls
FOLDER=~/storage/shared/dolphin-mmjr_bak/
if [ -d "$FOLDER" ]; then
echo -e "${GREEN}OK${NONE}"
else
if [ $hasDolphinMMJ == true ]; then
echo "### Creating dolphin Backup " &>> ~/storage/shared/pegasus_installer_log.log
cp -r ~/storage/shared/dolphin-mmjr ~/storage/shared/dolphin-mmjr_bak
rsync -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/odin/dolphin-mmjr/ ~/storage/shared/dolphin-mmjr &>> ~/storage/shared/pegasus_installer_log.log
fi
echo -e "${GREEN}OK${NONE}"
fi
echo -ne "Creating Duckstation Backup..."
FOLDER=~/storage/shared/duckstation/
if [ -d "$FOLDER" ]; then
echo -e "${GREEN}OK${NONE}"
else
if [ $hasDuckstation == true ]; then
echo "### Crearing Duckstation Bakckup " &>> ~/storage/shared/pegasus_installer_log.log
cp -r ~/storage/shared/duckstation/ ~/storage/shared/duckstation_bak/
rsync -r ~/dragoonDoriseTools/pegasus-android-metadata/internal/odin/duckstation/ ~/storage/shared/duckstation/ &>> ~/storage/shared/pegasus_installer_log.log
fi
echo -e "${GREEN}OK${NONE}"
fi
fi