local keyword doesn't exist

This commit is contained in:
Jeremy Gardais 2019-10-05 21:07:13 +02:00
parent a1f6b93474
commit 9ae6f2eecf
1 changed files with 9 additions and 9 deletions

View File

@ -21,18 +21,18 @@ local_steam_userdata="${HOME}/${steam_userdata}"
# Functions {{{ # Functions {{{
# Move one Steam save game dir {{{ # Move one Steam save game dir {{{
move_steam_game_dir() { move_steam_game_dir() {
local game_id="${1}" _game_id="${1}"
local local_game_path="${local_steam_userdata}/${game_id}" _local_game_path="${local_steam_userdata}/${_game_id}"
local remote_game_path="${remote_steam_userdata}/${game_id}" _remote_game_path="${remote_steam_userdata}/${_game_id}"
## If a remote directory doesn't already exists for this game ## If a remote directory doesn't already exists for this game
if [ ! -d "${remote_game_path}" ]; then if [ ! -d "${_remote_game_path}" ]; then
mv -- "${local_game_path}" "${remote_game_path}" 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." [ "${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}" 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' "Move Steam game Symlink remote to data of ${_game_id} to local storage."
else 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 delete data."
exit 5 exit 5
fi fi
} }