Change field separator to manage white space

This commit is contained in:
Jeremy Gardais 2019-10-09 17:44:58 +02:00
parent 2067c237f4
commit 1ca4ded439
1 changed files with 5 additions and 3 deletions

View File

@ -47,9 +47,11 @@ steam_userdata_games="760 35700 35720 55230 204360 206420 218820 247080 255870 3
## Pattern of Steam saves in common to backup {{{ ## Pattern of Steam saves in common to backup {{{
### Add the directory name of the game and the directory|file name to backup ### Add the directory name of the game and the directory|file name to backup
### separated by a slash. ### separated by a slash.
### eg. GAME_NAME/data.save ### To be able to manage white space in directory name, the field separator is %.
### eg. GAME NAME/data.save%other game/*.sav
### 620 Portal 2 https://pcgamingwiki.com/wiki/Portal_2 (solo only, multiplayer is on Steam cloud)
### 274190 Broforce https://pcgamingwiki.com/wiki/Broforce ### 274190 Broforce https://pcgamingwiki.com/wiki/Broforce
steam_common_games_pattern="Broforce/*.sav" steam_common_games_pattern="Portal 2/*.sav%Broforce/*.sav"
# }}} # }}}
## Pattern of Steam saves in compatdata to backup {{{ ## Pattern of Steam saves in compatdata to backup {{{
### Compatdata contains directories for games using Steam play so it's too big ### Compatdata contains directories for games using Steam play so it's too big
@ -65,7 +67,6 @@ steam_compatdata_games_pattern="213670/save 312610/UserDefault.xml 686200/userda
# }}} # }}}
## Ids without backups in userdata {{{ ## Ids without backups in userdata {{{
### 7 Unknown ### 7 Unknown
### 620 Portal 2 https://pcgamingwiki.com/wiki/Portal_2
### 49520 Borderlands 2 https://pcgamingwiki.com/wiki/Borderlands_2 ### 49520 Borderlands 2 https://pcgamingwiki.com/wiki/Borderlands_2
### 219150 Hotline Miami https://pcgamingwiki.com/wiki/Hotline_Miami ### 219150 Hotline Miami https://pcgamingwiki.com/wiki/Hotline_Miami
### 241100 Steam Controller Configs https://steamdb.info/app/241100/ ### 241100 Steam Controller Configs https://steamdb.info/app/241100/
@ -183,6 +184,7 @@ for game_id in ${steam_userdata_games}; do
done done
# }}} # }}}
# Manage Steam common save game {{{ # Manage Steam common save game {{{
IFS="%"
for game_pattern in ${steam_common_games_pattern}; do for game_pattern in ${steam_common_games_pattern}; do
## Separate the game_name and the directory|file to backup|symlink ## Separate the game_name and the directory|file to backup|symlink
game_name="$(echo ${game_pattern} | cut -d"/" -f1)" game_name="$(echo ${game_pattern} | cut -d"/" -f1)"