EmuDeck/tools/launchers/ryujinx.sh
Rodrigo 24582eeb74 Revert "== > ="
This reverts commit 28e8adc03d.
2023-11-30 22:39:36 +01:00

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"