2024-03-08 19:31:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-03-08 19:36:39 +00:00
|
|
|
# WARNING: run this script from the project root folder, not from here!!
|
|
|
|
|
2024-03-08 19:31:38 +00:00
|
|
|
# This script is used to inject framework and config files inside a RetroDECK cooker installation
|
|
|
|
# To apply the injected config you have to reset the targeted component from the Configurator
|
|
|
|
# Please know what you're doing, if you need to undo this you need to completely uninstall and reinstall RetroDECK flatpak
|
|
|
|
# Please not that this may create a dirty situation where older files are still in place as the action is add and overwrite
|
|
|
|
|
|
|
|
flatpak_user_installation="$HOME/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files"
|
|
|
|
flatpak_system_installation="/var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files"
|
|
|
|
|
|
|
|
if [ -d "$flatpak_user_installation" ]; then
|
|
|
|
echo "RetroDECK is installed in user mode, proceeding."
|
|
|
|
app="$flatpak_user_installation"
|
|
|
|
elif [ -d "$flatpak_system_installation" ]; then
|
2024-03-11 14:22:02 +00:00
|
|
|
echo "RetroDECK is installed in system mode, proceeding."
|
2024-03-08 19:31:38 +00:00
|
|
|
app="$flatpak_system_installation"
|
|
|
|
else
|
|
|
|
echo "RetroDECK installation not found, quitting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-03-19 23:19:06 +00:00
|
|
|
sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons"
|
|
|
|
sudo cp -vfr "emu-configs/"** "$app/retrodeck/emu-configs/"
|
|
|
|
sudo cp -vfr "tools" "$app"
|
2024-03-08 19:31:38 +00:00
|
|
|
sudo cp -vfr "retrodeck.sh" "$app/bin/"
|
|
|
|
sudo cp -vfr "functions/"** "$app/libexec/"
|