From 24b61b09d08f89db5742c1fef5ad82782aa2bdff Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 11 Oct 2019 17:39:36 +0200 Subject: [PATCH 01/14] Change the field separator --- games/save.game.xdg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/games/save.game.xdg b/games/save.game.xdg index 31c04a4..86f528a 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -134,6 +134,8 @@ done # }}} # Manage XDG config save game {{{ +## Set "%" as field separator +IFS="%" for game_name in ${xdg_config_games}; do local_game_path="${HOME}/${xdg_config}/${game_name}" local_game_path_type="$(ls -ld "${local_game_path}" | sed 's/\(^.\).*/\1/')" From 6b5f29fcfd69cadf0bf1b22a4d11dd1d38674688 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 11 Oct 2019 17:40:05 +0200 Subject: [PATCH 02/14] Change the case statement according to `ls` result --- games/save.game.xdg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games/save.game.xdg b/games/save.game.xdg index 86f528a..08cf25a 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -142,12 +142,12 @@ for game_name in ${xdg_config_games}; do case ${local_game_path_type} in ## Data is already a symlink - "symbolic") + "symbolic"|"l") link_name="$(file "${local_game_path}" | sed 's;.* symbolic link to \(.*\);\1;')" [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : XDG CONFIG for loop — The data of ${game_name} are already symlinked to ${link_name} . Skip." ;; ## Data is still a directory - "directory") + "directory"|"d") move_game_dir "${game_name}" "${xdg_config}" ;; ## Data doesn't exist From 91b5e874ed104e08b53f20ad35abba902d2cfedb Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 11 Oct 2019 17:40:54 +0200 Subject: [PATCH 03/14] Correct the path of Butcher and TrickyTower --- games/save.game.xdg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/games/save.game.xdg b/games/save.game.xdg index 08cf25a..18399e7 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -29,7 +29,7 @@ xdg_config="$(printf "%s" "${XDG_CONFIG_HOME}" | sed -e "s;${HOME}/;;")" ### List of video games for XDG CONFIG {{{ ### Broforce − unity3d − https://pcgamingwiki.com/wiki/Broforce -### Butcher − THD − https://pcgamingwiki.com/wiki/Butcher +### Butcher − unity3d − https://pcgamingwiki.com/wiki/Butcher ### Full Metal Furies − Cellar Door Games − https://pcgamingwiki.com/wiki/Full_Metal_Furies ### Jump Gunners − unity3d − https://pcgamingwiki.com/wiki/Jump_Gunners ### Never Alone − unity3d − https://pcgamingwiki.com/wiki/Never_Alone @@ -38,8 +38,8 @@ xdg_config="$(printf "%s" "${XDG_CONFIG_HOME}" | sed -e "s;${HOME}/;;")" ### Overcooked! 2 − unity3d − https://pcgamingwiki.com/wiki/Overcooked!_2 ### Risk of Rain − Risk_of_Rain − https://pcgamingwiki.com/wiki/Risk_of_Rain ### The Dishwasher: Vampire Smile − VampireSmile − https://pcgamingwiki.com/wiki/The_Dishwasher:_Vampire_Smile -### Tricky Towers − WeirdBeard − https://pcgamingwiki.com/wiki/Tricky_Towers -xdg_config_games="unity3d%THD%Cellar Door Games%nuclearthrone%Risk_of_Rain%VampireSmile%WeirdBeard" +### Tricky Towers − unity3d − https://pcgamingwiki.com/wiki/Tricky_Towers +xdg_config_games="unity3d%Cellar Door Games%nuclearthrone%Risk_of_Rain%VampireSmile" ### }}} ## }}} From eb504358f4c6be68a020828958b36aa798990060 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 11 Oct 2019 17:57:59 +0200 Subject: [PATCH 04/14] Add loop to manage XDG_DATA content --- games/save.game.xdg | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/games/save.game.xdg b/games/save.game.xdg index 18399e7..7115a6e 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -57,7 +57,7 @@ xdg_data="$(printf "%s" "${XDG_DATA_HOME}" | sed -e "s;${HOME}/;;")" ### Saints Row IV − vpltd − https://pcgamingwiki.com/wiki/Saints_Row_IV ### The Dishwasher: Vampire Smile − VampireSmile − https://pcgamingwiki.com/wiki/The_Dishwasher:_Vampire_Smile ### TowerFall Ascension − TowerFall − https://pcgamingwiki.com/wiki/TowerFall_Ascension -data_games="aspyr-media%Cellar Door Games%HotlineMiami%Tribute Games%PJShooter%vpltd%VampireSmile%TowerFall" +xdg_data_games="aspyr-media%Cellar Door Games%HotlineMiami%Tribute Games%PJShooter%vpltd%VampireSmile%TowerFall" ### }}} ## }}} @@ -164,3 +164,36 @@ for game_name in ${xdg_config_games}; do done # }}} +# Manage XDG data save game {{{ +## Set "%" as field separator +IFS="%" +for game_name in ${xdg_data_games}; do + local_game_path="${HOME}/${xdg_data}/${game_name}" + local_game_path_type="$(ls -ld "${local_game_path}" | sed 's/\(^.\).*/\1/')" + + case ${local_game_path_type} in + ## Data is already a symlink + "symbolic"|"l") + link_name="$(file "${local_game_path}" | sed 's;.* symbolic link to \(.*\);\1;')" + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : XDG DATA for loop — The data of ${game_name} are already symlinked to ${link_name} . Skip." + ;; + ## Data is still a directory + "directory"|"d") + move_game_dir "${game_name}" "${xdg_data}" + ;; + ## Data doesn't exist + "cannot") + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : XDG DATA for loop — The data of ${game_name} − ${local_game_path} doesn't exist. Skip." + symlink_game_dir "${game_name}" "${xdg_data}" + ;; + ## Data can't be managed + *) + printf '\e[1;35m%-6s\e[m\n' "Data of ${game_name} (userdata) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort" + exit 3 + ;; + esac + +done +# }}} + +exit 0 From f3a9284e4df6bb10163a0b1d563563995b3e72d4 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 11 Oct 2019 18:00:39 +0200 Subject: [PATCH 05/14] Add Capsized save --- games/save.game.xdg | 1 + games/xdg_data_tree.sample | 3 +++ 2 files changed, 4 insertions(+) diff --git a/games/save.game.xdg b/games/save.game.xdg index 7115a6e..b565ef7 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -49,6 +49,7 @@ xdg_data="$(printf "%s" "${XDG_DATA_HOME}" | sed -e "s;${HOME}/;;")" ### List of video games for XDG DATA {{{ ### Borderlands 2 − aspyr-media − https://pcgamingwiki.com/wiki/Borderlands_2 +### Capsized − Capsized − https://pcgamingwiki.com/wiki/Capsized ### Full Metal Furies − Cellar Door Games − https://pcgamingwiki.com/wiki/Full_Metal_Furies ### HotlineMiami − HotlineMiami − https://pcgamingwiki.com/wiki/Hotline_Miami ### Mercenary Kings − Tribute Games − https://pcgamingwiki.com/wiki/Mercenary_Kings diff --git a/games/xdg_data_tree.sample b/games/xdg_data_tree.sample index fba246c..b9164ed 100644 --- a/games/xdg_data_tree.sample +++ b/games/xdg_data_tree.sample @@ -17,6 +17,9 @@ │   ├── save0005.sav.bak │   ├── save0008.sav │   └── save0008.sav.bak +├── Capsized +│   ├── Config.cfg +│   └── Logs ├── Cellar Door Games │   └── Full Metal Furies │   └── Saves From 0c8fbeb5f5acf2ceb53039c5ccfe42bd28bd15fc Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 16:13:50 +0200 Subject: [PATCH 06/14] Add The Swapper save --- games/save.game.xdg | 3 ++- games/xdg_data_tree.sample | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/games/save.game.xdg b/games/save.game.xdg index b565ef7..31f459a 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -57,8 +57,9 @@ xdg_data="$(printf "%s" "${XDG_DATA_HOME}" | sed -e "s;${HOME}/;;")" ### Saints Row: The Third − vpltd − https://pcgamingwiki.com/wiki/Saints_Row:_The_Third ### Saints Row IV − vpltd − https://pcgamingwiki.com/wiki/Saints_Row_IV ### The Dishwasher: Vampire Smile − VampireSmile − https://pcgamingwiki.com/wiki/The_Dishwasher:_Vampire_Smile +### The Swapper − Facepalm Games − https://pcgamingwiki.com/wiki/The_Swapper ### TowerFall Ascension − TowerFall − https://pcgamingwiki.com/wiki/TowerFall_Ascension -xdg_data_games="aspyr-media%Cellar Door Games%HotlineMiami%Tribute Games%PJShooter%vpltd%VampireSmile%TowerFall" +xdg_data_games="aspyr-media%Capsized%Cellar Door Games%HotlineMiami%Tribute Games%PJShooter%vpltd%VampireSmile%Facepalm Games%TowerFall" ### }}} ## }}} diff --git a/games/xdg_data_tree.sample b/games/xdg_data_tree.sample index b9164ed..831138b 100644 --- a/games/xdg_data_tree.sample +++ b/games/xdg_data_tree.sample @@ -27,6 +27,21 @@ │   ├── profileData1.brdat │   ├── profileData1.brdat_BACKUP │   └── TEMPprofileData1.brdat +├── Facepalm Games +│   └── The Swapper 1000 +│   ├── CommonSettings.ini +│   ├── CommonSettings.pro +│   ├── CommonSettings.pro.old +│   ├── controller_mappings_user.txt +│   ├── darker.ini +│   ├── darker.ini.old +│   ├── darker.pro +│   ├── darker.pro.old +│   ├── Default.ini +│   ├── gardouill.ini +│   ├── gardouill.pro +│   ├── gardouill.pro.old +│   └── TrueEngineLog.txt ├── HotlineMiami │   ├── debug.log │   ├── hotline.cfg From 6ee8a2a951dbde94333fbbae78db1badafa93354 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 16:38:47 +0200 Subject: [PATCH 07/14] Correct comments and informations --- games/save.game.xdg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/games/save.game.xdg b/games/save.game.xdg index 31f459a..8627d43 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -15,8 +15,8 @@ ## 2. If a directory doesn't exist, check if a remote one is ## available and symlink it. ## -## KISS : Only manage save directories from Steam userdata. For other -## paths (Steam,…) check other scripts. +## KISS : Only manage save directories from XDG. For other paths (Steam, home,…) +## check other scripts. # }}} # Vars {{{ @@ -159,7 +159,7 @@ for game_name in ${xdg_config_games}; do ;; ## Data can't be managed *) - printf '\e[1;35m%-6s\e[m\n' "Data of ${game_name} (userdata) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort" + printf '\e[1;35m%-6s\e[m\n' "Data of ${game_name} (XDG CONFIG) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort" exit 3 ;; esac @@ -190,7 +190,7 @@ for game_name in ${xdg_data_games}; do ;; ## Data can't be managed *) - printf '\e[1;35m%-6s\e[m\n' "Data of ${game_name} (userdata) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort" + printf '\e[1;35m%-6s\e[m\n' "Data of ${game_name} (XDG DATA) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort" exit 3 ;; esac From 2a63b0c096ffa03367e41f93e63e244014e224ba Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 16:39:00 +0200 Subject: [PATCH 08/14] Prepare a script to manage extra save games in home aka save path outside of XDG or Steam. --- games/save.game.home | 124 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100755 games/save.game.home diff --git a/games/save.game.home b/games/save.game.home new file mode 100755 index 0000000..56234e5 --- /dev/null +++ b/games/save.game.home @@ -0,0 +1,124 @@ +#!/bin/sh + +# Purpose {{{ +## Try to centralize all game's save that doesn't respect XDG specifications +## or Steam directories in order to : +## easily backup all save +## easily restore it +## be able to access it from anywhere +## … all you can do with a Nextcloud (share, versionning,…) +## +## 1. Move save directories of a list of known games from homedir (or subdir) +## to a remote directory (Nextcloud, remote mount,…). +## Then create a symlink in home directory to the remote game directory. +## +## 2. If a directory doesn't exist, check if a remote one is available +## and symlink it. +## +## KISS : Only manage save directories from home directory (or subdir). +## For other paths (Steam,…) check other scripts. +# }}} + +# Vars {{{ +debug=0 + +## List of video games for homedir {{{ +### Give the relative path from homedir. +### Separate each path with "%" to be able to manage white space, eg : +### .mygame%.first-subtree/save of GAMEX +### +games_list="..." +## }}} + +remote_dir="${HOME}/Nextcloud/games/linux.sgl.script" + +# }}} + +# Functions {{{ +# Move one save game dir {{{ +move_game_dir() { + _game_name="${1}" + _game_dir="${2}" + _local_game_path="${HOME}/${_game_dir}/${_game_name}" + _remote_game_path="${remote_dir}/${_game_dir}/${_game_name}" + + ## If a remote directory doesn't already exists for this game + if [ ! -d "${_remote_game_path}" ]; then + ### Ensure to create tree directories on remote storage + mkdir -p -- "$(dirname "${_remote_game_path}")" + ### Move data to remote storage + mv -- "${_local_game_path}" "${_remote_game_path}" + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Move game − The data of ${_game_name} − ${_local_game_path} moved to remote storage." + ### Then ask to create a symbolic link to local storage + symlink_game_dir "${_game_name}" "${_game_dir}" + else + printf '\e[1;35m%-6s\e[m\n' "Move game − ${_game_name} already have data on remote storage : ${_remote_game_path}. Abort to avoid to override data." + exit 5 + fi +} +# }}} +# Symlink one save game dir from remote to local {{{ +symlink_game_dir() { + _game_name="${1}" + _game_dir="${2}" + _local_game_path="${HOME}/${_game_dir}/${_game_name}" + _remote_game_path="${remote_dir}/${_game_dir}/${_game_name}" + + if [ -d "${_remote_game_path}" ]; then + ln -s -- "${_remote_game_path}" "${_local_game_path}" + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Symlink game — Symlink remote data of ${_game_name} to local storage." + else + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Symlink game — ${_game_name} doesn't have remote data." + fi +} +# }}} + +# }}} + +# Tests {{{ + +## Ensure remote dir exist {{{ +if [ ! -d "${remote_dir}" ]; then + printf '\e[1;35m%-6s\e[m\n' "The directory for save game doesn't exists : ${remote_dir}" + exit 1 +fi +## }}} + +# }}} + +# Manage save game from homedir {{{ +## Set "%" as field separator +IFS="%" +for game_path in ${games_list}; do + local_game_path="${HOME}/${game_path}" + local_game_path_type="$(ls -ld "${local_game_path}" | sed 's/\(^.\).*/\1/')" + + game_name="$(basename "${game_path}")" + game_dir="$(direname "${game_path}")" + + case ${local_game_path_type} in + ## Data is already a symlink + "symbolic"|"l") + link_name="$(file "${local_game_path}" | sed 's;.* symbolic link to \(.*\);\1;')" + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Homedir for loop — The data of ${game_path} are already symlinked to ${link_name} . Skip." + ;; + ## Data is still a directory + "directory"|"d") + move_game_dir "${game_name}" "${game_dir}" + ;; + ## Data doesn't exist + "cannot") + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Homedir for loop — The data of ${game_path} − ${local_game_path} doesn't exist. Skip." + symlink_game_dir "${game_name}" "${game_dir}" + ;; + ## Data can't be managed + *) + printf '\e[1;35m%-6s\e[m\n' "Data of ${game_path} (Homedir) − ${local_game_path} are not managed. Type: ${local_game_path_type}. Abort" + exit 3 + ;; + esac + +done +# }}} + +exit 0 From 91d13df3b2d6b80936e25508d6ff8a3343cdbb44 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 16:48:22 +0200 Subject: [PATCH 09/14] Add an extra subtree on remote directory --- games/save.game.home | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/games/save.game.home b/games/save.game.home index 56234e5..a148195 100755 --- a/games/save.game.home +++ b/games/save.game.home @@ -31,6 +31,7 @@ games_list="..." ## }}} remote_dir="${HOME}/Nextcloud/games/linux.sgl.script" +home_remote_dir="${remote_dir}/home" # }}} @@ -40,7 +41,7 @@ move_game_dir() { _game_name="${1}" _game_dir="${2}" _local_game_path="${HOME}/${_game_dir}/${_game_name}" - _remote_game_path="${remote_dir}/${_game_dir}/${_game_name}" + _remote_game_path="${home_remote_dir}/${_game_dir}/${_game_name}" ## If a remote directory doesn't already exists for this game if [ ! -d "${_remote_game_path}" ]; then @@ -62,7 +63,7 @@ symlink_game_dir() { _game_name="${1}" _game_dir="${2}" _local_game_path="${HOME}/${_game_dir}/${_game_name}" - _remote_game_path="${remote_dir}/${_game_dir}/${_game_name}" + _remote_game_path="${home_remote_dir}/${_game_dir}/${_game_name}" if [ -d "${_remote_game_path}" ]; then ln -s -- "${_remote_game_path}" "${_local_game_path}" @@ -94,7 +95,7 @@ for game_path in ${games_list}; do local_game_path_type="$(ls -ld "${local_game_path}" | sed 's/\(^.\).*/\1/')" game_name="$(basename "${game_path}")" - game_dir="$(direname "${game_path}")" + game_dir="$(dirname "${game_path}")" case ${local_game_path_type} in ## Data is already a symlink From fd7027fd5f98de00a27df0ec65f74b9198c1853e Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 16:51:07 +0200 Subject: [PATCH 10/14] Manage extra dir for Overcooked 2 and Trine 1 & 2 --- games/save.game.home | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/games/save.game.home b/games/save.game.home index a148195..fcffab9 100755 --- a/games/save.game.home +++ b/games/save.game.home @@ -26,8 +26,11 @@ debug=0 ### Give the relative path from homedir. ### Separate each path with "%" to be able to manage white space, eg : ### .mygame%.first-subtree/save of GAMEX -### -games_list="..." +### ^ +### Overcooked! 2 − Team17 − https://pcgamingwiki.com/wiki/Overcooked!_2 +### Trine Enchanted Edition − .frozenbyte − https://pcgamingwiki.com/wiki/Trine_Enchanted_Edition +### Trine 2 Complete Story − .frozenbyte − https://pcgamingwiki.com/wiki/Trine_2 +games_list="Team17%.frozenbyte" ## }}} remote_dir="${HOME}/Nextcloud/games/linux.sgl.script" From 68cb9810376cf1397cbab3bc9cf99628d0e1280f Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 19:26:15 +0200 Subject: [PATCH 11/14] Add purpose --- games/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/games/README.md b/games/README.md index 8774b48..ae16506 100644 --- a/games/README.md +++ b/games/README.md @@ -1,5 +1,18 @@ # Save game management +Collection of scripts in order to move all (as much as i can) save of my +video games in one remote place (eg. Nextcloud directory,…). Then a symbolic +link should take place of the directories. This allows me to : +* Have save in the cloud for all games ! +* Easily find my save in one place. +* Easily backup everything (one `tar` to backup them all). +* Synchronize save between Linux hosts. +* Restore save if anything happens to my game computer. +* Everything that Nextcloud allows me to do (access from anywhere, share,…). + + +## How-to add new save + Sources of informations : * Various informations (save path,…) : https://pcgamingwiki.com/wiki * Match steam id and game name : https://steamdb.info/ From 156b2ff45468bd4cf1155a37bef58431ec87495f Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 20:32:07 +0200 Subject: [PATCH 12/14] Add a "master" script --- games/save.game | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 games/save.game diff --git a/games/save.game b/games/save.game new file mode 100755 index 0000000..472f9c1 --- /dev/null +++ b/games/save.game @@ -0,0 +1,31 @@ +#!/bin/sh + +# Purpose {{{ +## Run all other save.game.* scripts. +# }}} + +# Vars {{{ +script_wd=$(dirname -- "${0}") + +## List of scripts +home_script="save.game.home" +steam_script="save.game.steam" +xdg_script="save.game.xdg" + +# }}} + +# For all scripts, try to run +for script in "${home_script}" "${steam_script}" "${xdg_script}"; do + + ## If the script doesn't exist + if [ ! -f "${script_wd}/${script}" ]; then + printf '\e[1;35m%-6s\e[m\n' "Loop script − ${script} doesn't seems to exist. Abort." + exit 1 + fi + + ## Run the script + sh "${script_wd}/${script}" + +done + +exit 0 From 8216c105e525c6b48a712cbc70a27263940ee109 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 20:32:20 +0200 Subject: [PATCH 13/14] Add debug printf to display the running script --- games/save.game.home | 2 ++ games/save.game.steam | 2 ++ games/save.game.xdg | 2 ++ 3 files changed, 6 insertions(+) diff --git a/games/save.game.home b/games/save.game.home index fcffab9..94481ed 100755 --- a/games/save.game.home +++ b/games/save.game.home @@ -90,6 +90,8 @@ fi # }}} + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Run save game script for Homedir." + # Manage save game from homedir {{{ ## Set "%" as field separator IFS="%" diff --git a/games/save.game.steam b/games/save.game.steam index d3f862f..3fd3662 100755 --- a/games/save.game.steam +++ b/games/save.game.steam @@ -157,6 +157,8 @@ done # }}} + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Run save game script for Steam." + # Manage Steam userdata save game {{{ for game_id in ${steam_userdata_games}; do local_game_path="${HOME}/${steam_userdata}/${game_id}" diff --git a/games/save.game.xdg b/games/save.game.xdg index 8627d43..39d7162 100755 --- a/games/save.game.xdg +++ b/games/save.game.xdg @@ -135,6 +135,8 @@ done # }}} + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Run save game script for XDG." + # Manage XDG config save game {{{ ## Set "%" as field separator IFS="%" From d1861b850233c168b4eef2db1bdd3d945e83b177 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 13 Oct 2019 20:51:37 +0200 Subject: [PATCH 14/14] Add the list of games --- games/README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/games/README.md b/games/README.md index ae16506..4e997ef 100644 --- a/games/README.md +++ b/games/README.md @@ -10,6 +10,55 @@ link should take place of the directories. This allows me to : * Restore save if anything happens to my game computer. * Everything that Nextcloud allows me to do (access from anywhere, share,…). +## How-to use + +Run the main script to automatically run the 3 others : + +``` sh +~/repos/gardouille.scripts/games/save.game +``` + +This will run : +- **save.game.steam** : Try to move or symlink saves from 3 Steam's directories, +userdata, common and compatdata. +- **save.game.xdg** : Try to move or symlink save that respect the XDG +specifications (~/.config and ~/.local/share). +- **save.game.home** : Try to move or symlink other saves that the devs have +seen fit to place anywhere else… + +## Currently managed games + +* Borderlands 2 − https://pcgamingwiki.com/wiki/Borderlands_2 +* Broforce − https://pcgamingwiki.com/wiki/Broforce +* Butcher − https://pcgamingwiki.com/wiki/Butcher +* Capsized − https://pcgamingwiki.com/wiki/Capsized +* Castle Crashers − https://pcgamingwiki.com/wiki/Castle_Crashers +* Crypt of the Necrodancer − https://pcgamingwiki.com/wiki/Crypt_of_the_Necrodancer +* Door Kickers: Action Squad − https://pcgamingwiki.com/wiki/Door_Kickers:_Action_Squad +* Duck Game − https://pcgamingwiki.com/wiki/Duck_Game +* Full Metal Furies − https://pcgamingwiki.com/wiki/Full_Metal_Furies +* HotlineMiami − https://pcgamingwiki.com/wiki/Hotline_Miami +* Jump Gunners − https://pcgamingwiki.com/wiki/Jump_Gunners +* Mercenary Kings − https://pcgamingwiki.com/wiki/Mercenary_Kings +* Metal Slug X − https://pcgamingwiki.com/wiki/Metal_Slug_X +* Never Alone − https://pcgamingwiki.com/wiki/Never_Alone +* Nuclear Throne − https://pcgamingwiki.com/wiki/Nuclear_Throne +* Overcooked! 2 − https://pcgamingwiki.com/wiki/Overcooked!_2 +* PixelJunk Shooter − https://pcgamingwiki.com/wiki/PixelJunk_Shooter +* Portal 2 − https://pcgamingwiki.com/wiki/Portal_2 (solo only, multiplayer is on Steam cloud) +* Prey (2017) − https://pcgamingwiki.com/wiki/Prey_(2017) (don't work yet) +* Risk of Rain − https://pcgamingwiki.com/wiki/Risk_of_Rain +* Saints Row IV − https://pcgamingwiki.com/wiki/Saints_Row_IV +* Saints Row: The Third − https://pcgamingwiki.com/wiki/Saints_Row:_The_Third +* Shift Happens − https://pcgamingwiki.com/wiki/Shift_Happens (don't work yet) +* South Park: The Stick of Truth − https://pcgamingwiki.com/wiki/South_Park:_The_Stick_of_Truth +* Steam Screenshots − https://steamdb.info/app/760/ +* The Dishwasher: Vampire Smile − https://pcgamingwiki.com/wiki/The_Dishwasher:_Vampire_Smile +* The Swapper − https://pcgamingwiki.com/wiki/The_Swapper +* TowerFall Ascension − https://pcgamingwiki.com/wiki/TowerFall_Ascension (not managed cause no substree, check $XDG_DATA_HOME) +* Tricky Towers − https://pcgamingwiki.com/wiki/Tricky_Towers +* Trine 2 Complete Story − https://pcgamingwiki.com/wiki/Trine_2 +* Trine Enchanted Edition − https://pcgamingwiki.com/wiki/Trine_Enchanted_Edition ## How-to add new save