mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-05-20 05:10:46 -04:00
24582eeb74
This reverts commit 28e8adc03d
.
28 lines
895 B
Bash
Executable file
28 lines
895 B
Bash
Executable file
#!/bin/sh
|
|
source $HOME/.config/EmuDeck/backend/functions/all.sh
|
|
cloud_sync_downloadEmu pcsx2 && cloud_sync_startService
|
|
emuName="pcsx2-Qt" #parameterize me
|
|
emufolder="$HOME/Applications" # has to be applications for ES-DE to find it
|
|
|
|
#find full path to emu executable
|
|
exe=$(find $emufolder -iname "${emuName}*.AppImage" | 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} -bigpicture -fullscreen"
|
|
cloud_sync_uploadEmu pcsx2
|