From f8e516c37cef187491108748875aad39c32e399f Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 8 Oct 2019 19:10:37 +0200 Subject: [PATCH] Use symlink function as much as possible --- games/save.game.steam | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/games/save.game.steam b/games/save.game.steam index 0ec645b..b1bb77c 100755 --- a/games/save.game.steam +++ b/games/save.game.steam @@ -90,12 +90,13 @@ move_steam_game_dir() { ## If a remote directory doesn't already exists for this game if [ ! -d "${_remote_game_path}" ]; then + ### Move data to remote storage mv -- "${_local_game_path}" "${_remote_game_path}" - [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "Move Steam game − The data of ${_game_id} − ${_local_game_path} moved to remote storage." - ln -s -- "${_remote_game_path}" "${_local_game_path}" - [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "Move Steam game − Symlink remote to data of ${_game_id} to local storage." + [ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Move Steam game − The data of ${_game_id} − ${_local_game_path} moved to remote storage." + ### Then ask to create a symbolic link to local storage + symlink_steam_game_dir "${_game_id}" "${_steam_dir}" else - printf '\e[1;35m%-6s\e[m\n' "Move Steam game − ${_game_id} already have data on remote storage : ${_remote_game_path}. Abort to avoid to delete data." + printf '\e[1;35m%-6s\e[m\n' "Move Steam game − ${_game_id} already have data on remote storage : ${_remote_game_path}. Abort to avoid to override data." exit 5 fi }