From ff4205632d0d848cb992a58b203dd39f22e01662 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 5 Sep 2024 21:03:33 +0900 Subject: [PATCH] STEAM_SYNC_SH: added prepare_component [skip ci] --- .../steam-rom-manager}/userConfigurations.json | 0 .../steam-rom-manager}/userExceptions.json | 0 functions/prepare_component.sh | 10 +++++++++- 3 files changed, 9 insertions(+), 1 deletion(-) rename {functions/steam-sync => config/steam-rom-manager}/userConfigurations.json (100%) rename {functions/steam-sync => config/steam-rom-manager}/userExceptions.json (100%) diff --git a/functions/steam-sync/userConfigurations.json b/config/steam-rom-manager/userConfigurations.json similarity index 100% rename from functions/steam-sync/userConfigurations.json rename to config/steam-rom-manager/userConfigurations.json diff --git a/functions/steam-sync/userExceptions.json b/config/steam-rom-manager/userExceptions.json similarity index 100% rename from functions/steam-sync/userExceptions.json rename to config/steam-rom-manager/userExceptions.json diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 31f63eb7..ab590bd5 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -86,7 +86,15 @@ prepare_component() { log i "Prepearing Steam ROM Manager" log i "----------------------" - python3 /app/libexec/steam-sync/resetsync.py + local srm_path="/var/config/steam-rom-manager/userData" + create_dir -d $srm_path + cp -fv "$config/steam-rom-manager/"*.json $srm_path + steam-rom-manager list + + log i "Updating steamDirectory and romDirectory lines in $srm_path/userConfigurations.json" + jq --arg steamDir "$HOME/.steam/steam" --arg romDir "$rdhome/.sync" \ + '.[0].steamDirectory = $steamDir | .[0].romDirectory = $romDir' \ + "$srm_path/userConfigurations.json" > tmpfile && mv tmpfile "$srm_path/userConfigurations.json" fi if [[ "$component" =~ ^(retroarch|all)$ ]]; then