mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-05-20 05:10:46 -04:00
24582eeb74
This reverts commit 28e8adc03d
.
27 lines
875 B
Bash
Executable file
27 lines
875 B
Bash
Executable file
#!/bin/sh
|
|
source $HOME/.config/EmuDeck/backend/functions/all.sh
|
|
cloud_sync_downloadEmu "ryujinx" && cloud_sync_startService
|
|
emuName="Ryujinx.sh" #parameterize me
|
|
emufolder="$HOME/Applications/publish" # has to be applications for ES-DE to find it
|
|
|
|
#find full path to emu executable
|
|
exe=$(find $emufolder -iname "${emuName}" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null)
|
|
|
|
#if appimage doesn't exist fall back to flatpak.
|
|
if [[ $exe == '' ]]; then
|
|
#flatpak
|
|
flatpakApp=$(flatpak list --app --columns=application | grep $emuName)
|
|
exe="/usr/bin/flatpak run "$flatpakApp
|
|
else
|
|
#make sure that file is executable
|
|
chmod +x $exe
|
|
fi
|
|
#run the executable with the params.
|
|
#Fix first '
|
|
param="${@}"
|
|
substituteWith='"'
|
|
param=${param/\'/"$substituteWith"}
|
|
#Fix last ' on command
|
|
param=$(echo "$param" | sed 's/.$/"/')
|
|
eval "${exe} ${param}"
|
|
rm -rf "$savesPath/.gaming" |