Try to symlink to remote dir even for unknown type

This commit is contained in:
Jeremy Gardais 2019-10-26 18:15:07 +02:00
parent 86d916ea86
commit 03d9b6a251
1 changed files with 10 additions and 2 deletions

View File

@ -71,8 +71,10 @@ symlink_game_dir() {
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."
return 0
else
[ "${debug}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Symlink game — ${_game_name} doesn't have remote data."
return 1
fi
}
# }}}
@ -119,8 +121,14 @@ for game_path in ${games_list}; do
;;
## 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
### Still try to symlink the savegame directory
symlink_game_dir "${game_name}" "${game_dir}"
### If the symlink failed
if [ "${?}" != 0 ]; then
echo $?
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
fi
;;
esac