local keyword doesn't exist
This commit is contained in:
parent
a1f6b93474
commit
9ae6f2eecf
@ -21,18 +21,18 @@ local_steam_userdata="${HOME}/${steam_userdata}"
|
||||
# Functions {{{
|
||||
# Move one Steam save game dir {{{
|
||||
move_steam_game_dir() {
|
||||
local game_id="${1}"
|
||||
local local_game_path="${local_steam_userdata}/${game_id}"
|
||||
local remote_game_path="${remote_steam_userdata}/${game_id}"
|
||||
_game_id="${1}"
|
||||
_local_game_path="${local_steam_userdata}/${_game_id}"
|
||||
_remote_game_path="${remote_steam_userdata}/${_game_id}"
|
||||
|
||||
## If a remote directory doesn't already exists for this game
|
||||
if [ ! -d "${remote_game_path}" ]; then
|
||||
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."
|
||||
if [ ! -d "${_remote_game_path}" ]; then
|
||||
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."
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user