From 739e873898a14f3bcc54c0794181a0aa8fdbb164 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 1 Nov 2019 13:44:18 +0100 Subject: [PATCH] Set '%' as field separator for compatdata games --- games/save.game.steam | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/games/save.game.steam b/games/save.game.steam index 39e8a4a..072700d 100755 --- a/games/save.game.steam +++ b/games/save.game.steam @@ -58,15 +58,16 @@ steam_common_games_pattern="Portal 2/*.sav%Broforce/*.sav" ## Pattern of Steam saves in compatdata to backup {{{ ### Compatdata contains directories for games using Steam play so it's too big ### to be fully moved to a remote storage. -### Add the game id and the directory|file name to backup separated by a slash -### eg. GAME_ID/savedata.xml +### Add the game id and the directory|file name to backup separated by a slash. +### And, to be able to manage white space in pattern name, the field separator is %. +### eg. GAME_ID/savedata.xml%GAME_ID42/user.bin ### 213670 − South Park: The Stick of Truth − https://pcgamingwiki.com/wiki/South_Park:_The_Stick_of_Truth ### 242760 − The Forest − https://www.pcgamingwiki.com/wiki/The_Forest ### 312610 − Metal Slug X − https://pcgamingwiki.com/wiki/Metal_Slug_X ### 359840 − Shift Happens − https://pcgamingwiki.com/wiki/Shift_Happens (don't work yet) ### 480490 − Prey (2017) − https://pcgamingwiki.com/wiki/Prey_(2017) (don't work yet) ### 686200 − Door Kickers: Action Squad − https://pcgamingwiki.com/wiki/Door_Kickers:_Action_Squad -steam_compatdata_games_pattern="213670/save 242760/TheForest 312610/UserDefault.xml 686200/userdata.bin" +steam_compatdata_games_pattern="213670/save%242760/TheForest%312610/UserDefault.xml%686200/userdata.bin" # }}} ## Ids without backups in userdata {{{ ### 7 − Unknown @@ -245,6 +246,7 @@ for game_pattern in ${steam_common_games_pattern}; do done # }}} # Manage Steam compatdata save game {{{ +IFS="%" for game_pattern in ${steam_compatdata_games_pattern}; do ## Separate the game_id and the directory|file to backup|symlink game_id="$(echo "${game_pattern}" | cut -d"/" -f1)"