From 43f682d7e89789c329ab5dd3cff83b35472bc4f0 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 7 Oct 2019 20:48:17 +0200 Subject: [PATCH] Move save.game script to specific directory --- save.game.link => games/save.game.steam | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) rename save.game.link => games/save.game.steam (83%) diff --git a/save.game.link b/games/save.game.steam similarity index 83% rename from save.game.link rename to games/save.game.steam index 4d07160..7fca946 100755 --- a/save.game.link +++ b/games/save.game.steam @@ -1,5 +1,26 @@ #!/bin/sh +# Purpose {{{ +## Try to centralize all game's save 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 Steam's +## userdata to a remote directory (Nextcloud, remote mount,…). +## Then create a symlink in userdata directory to the remote game +## directory. +## +## 2. If a directory doesn't exist, check if a remote one is +## available and symlink it. +## +## TODO : 3. List directories without symlinks. +## +## KISS : Only manage save directories from Steam userdata. For other +## paths ($XDG_DATA_HOME,…) check other scripts. +# }}} + # Vars {{{ debug=0 @@ -82,7 +103,6 @@ for game_id in ${steam_games}; do local_game_path="${local_steam_userdata}/${game_id}" local_game_path_type="$(file ${local_steam_userdata}/${game_id} | cut -d' ' -f2)" - case ${local_game_path_type} in ## Data is already a symlink "symbolic") @@ -102,6 +122,6 @@ for game_id in ${steam_games}; do exit 3 ;; esac -# }}} done +# }}}