-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemu_update
149 lines (136 loc) · 5.76 KB
/
emu_update
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
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/bash
# vim:ft=sh
#downloads a list of emulator appimages and updates them too when run again
# emu_path="$HOME/downloads/emu"
emu_path="/mnt/data/emulation/emu"
cd /tmp || exit 1
printf "updating Snes9x: "
release=$(curl -sL https://github.com/snes9xgit/snes9x/releases | grep /snes9xgit/snes9x/releases/tag | head -n1 | cut -d'"' -f6 | cut -d/ -f6)
if ! find "$emu_path" | grep -q Snes9x-"$release"
then
rm -f "$emu_path"/Snes9x*
wget -q https://github.com/snes9xgit/snes9x/releases/download/"$release"/Snes9x-"$release"-x86_64.AppImage
mv -f Snes9x* "$emu_path"
printf "\033[0;32mupdated Snes9x\033[0m\n"
else
printf "\033[0;31mSnes9x already at newest version\033[0m\n"
fi
printf "updating Mupen64: "
release=$(curl -sL https://github.com/Rosalie241/RMG/releases | grep /Rosalie241/RMG/releases/tag | head -n1 | cut -d'"' -f6 | cut -d/ -f6)
if ! find "$emu_path" | grep -q RMG-Portable-Linux64-"$release"
then
rm -f "$emu_path"/RMG*
wget -q https://github.com/Rosalie241/RMG/releases/download/"$release"/RMG-Portable-Linux64-"$release".AppImage
mv -f RMG-Portable* "$emu_path"
printf "\033[0;32mupdated Mupen64\033[0m\n"
else
printf "\033[0;31mMupen64 already at newest version\033[0m\n"
fi
printf "updating mGBA: "
release=$(curl -sL https://github.com/mgba-emu/mgba/releases | grep /mgba-emu/mgba/releases/tag | head -n1 | cut -d'"' -f6 | cut -d/ -f6)
if ! find "$emu_path" | grep -q mGBA-"$release"
then
wget -q https://github.com/mgba-emu/mgba/releases/download/"$release"/mGBA-"$release"-appimage-x64.AppImage
mv -f mGBA* "$emu_path"
printf "\033[0;32mupdated mGBA\033[0m\n"
else
printf "\033[0;31mmGBA already at newest version\033[0m\n"
fi
printf "updating citra: "
if ! find "$emu_path" | grep -q citra
then
# echo -e "downloading citra from archive.org which can be slow at times...\nsince it's the last release of citra it's only downloading it once\nplease be patient"
wget -q https://archive.org/download/citra-latest-stuff/Nightly%20build%20%2B%20source%20-%200ff3440/citra-linux-appimage-20240303-0ff3440.tar.gz
tar xzf citra*.tar.gz --directory="$emu_path" --strip-components=1 --wildcards '*/citra-qt.AppImage'
rm citra*
printf "\033[0;32mupdated citra\033[0m\n"
else
printf "\033[0;31mcitra already at newest version\033[0m\n"
fi
printf "updating Dolphin: "
wget -q https://github.com/lucasmz1/Dolphin_emu_Appimage/releases/download/continuous-stable/Dolphin_Emulator-x86_64.AppImage
if ! find "$emu_path" | grep -q Dolphin
then
mv -f Dolphin* "$emu_path"
printf "\033[0;32mupdated Dolphin\033[0m\n"
else
downloaded_hash=$(sha256sum Dolphin* | awk '{print $1}')
existing_hash=$(sha256sum "$emu_path"/Dolphin* | awk '{print $1}')
if [ "$downloaded_hash" == "$existing_hash" ]; then
rm Dolphin*
printf "\033[0;31mDolphin already at newest version\033[0m\n"
else
mv -f Dolphin* "$emu_path"
printf "\033[0;32mupdated Dolphin\033[0m\n"
fi
fi
printf "updating Cemu: "
release=$(curl -sL https://github.com/cemu-project/Cemu/releases | grep /cemu-project/Cemu/releases/tag | head -n1 | cut -d'"' -f6 | cut -d/ -f6 | sed 's|v||')
if ! find "$emu_path" | grep -q Cemu-"$release"
then
rm -f "$emu_path"/Cemu*
wget -q https://github.com/cemu-project/Cemu/releases/download/v"$release"/Cemu-"$release"-x86_64.AppImage
mv -f Cemu* "$emu_path"
printf "\033[0;32mupdated Cemu\033[0m\n"
else
printf "\033[0;31mCemu already at newest version\033[0m\n"
fi
printf "updating DuckStation: "
wget -q https://github.com/stenzek/duckstation/releases/download/preview/DuckStation-x64.AppImage
if ! find "$emu_path" | grep -q DuckStation
then
mv -f DuckStation* "$emu_path"
printf "\033[0;32mupdated DuckStation\033[0m\n"
else
downloaded_hash=$(sha256sum DuckStation* | awk '{print $1}')
existing_hash=$(sha256sum "$emu_path"/DuckStation* | awk '{print $1}')
if [ "$downloaded_hash" == "$existing_hash" ]; then
rm -f DuckStation*
printf "\033[0;31mDuckStation already at newest version\033[0m\n"
else
mv -f DuckStation* "$emu_path"
printf "\033[0;32mupdated DuckStation\033[0m\n"
fi
fi
printf "updating pcsx2: "
release=$(curl -sL https://github.com/PCSX2/pcsx2/releases | grep /PCSX2/pcsx2/releases/tag | head -n1 | cut -d'"' -f6 | cut -d/ -f6)
if ! find "$emu_path" | grep -q "$release"
then
wget -q https://github.com/PCSX2/pcsx2/releases/download/"$release"/pcsx2-"$release"-linux-appimage-x64-Qt.AppImage
rm -f "$emu_path"/pcsx2*
mv -f pcsx2* "$emu_path"
printf "\033[0;32mupdated pcsx2\033[0m\n"
else
printf "\033[0;31mpcsx2 already at newest version\033[0m\n"
fi
printf "updating flycast: "
release=$(curl -sL https://github.com/flyinghead/flycast/releases | grep /flyinghead/flycast/releases/tag | grep -vi ios | head -n1 | cut -d'"' -f6 | cut -d/ -f6)
if ! find "$emu_path" | grep -q "$release"
then
wget -q https://github.com/flyinghead/flycast/releases/download/"$release"/flycast-x86_64.AppImage
mv -f flycast* "$emu_path"/flycast-"$release"-x86_64.AppImage
printf "\033[0;32mupdated flycast\033[0m\n"
else
printf "\033[0;31mflycast already at newest version\033[0m\n"
fi
printf "updating PPSSPP: "
git clone -q https://gitlab.com/Miguel-hrvs/ppsspp-appimage
if ! find "$emu_path" | grep -q PPSSPP
then
mv -f ppsspp-appimage/builds/*.AppImage "$emu_path"
rm -rf ppsspp-appimage
printf "\033[0;32mupdated PPSSPP\033[0m\n"
else
downloaded_hash=$(sha256sum ppsspp-appimage/builds/PPSSPP* | awk '{print $1}')
existing_hash=$(sha256sum "$emu_path"/PPSSPP* | awk '{print $1}')
if [ "$downloaded_hash" == "$existing_hash" ]; then
rm -rf ppsspp-appimage
printf "\033[0;31mPPSSPP already at newest version\033[0m\n"
else
mv -f ppsspp-appimage/builds/*.appimage "$emu_path"
rm -rf ppsspp-appimage
printf "\033[0;32mupdated PPSSPP\033[0m\n"
fi
fi
chmod u+x "$emu_path"/*.AppImage
printf "\n\033[0;32mall done\033[0m\n"