Add an extra subtree on remote directory
This commit is contained in:
		
							parent
							
								
									2a63b0c096
								
							
						
					
					
						commit
						91d13df3b2
					
				|  | @ -31,6 +31,7 @@ games_list="..." | |||
| ## }}} | ||||
| 
 | ||||
| remote_dir="${HOME}/Nextcloud/games/linux.sgl.script" | ||||
| home_remote_dir="${remote_dir}/home" | ||||
| 
 | ||||
| # }}} | ||||
| 
 | ||||
|  | @ -40,7 +41,7 @@ move_game_dir() { | |||
| 	_game_name="${1}" | ||||
| 	_game_dir="${2}" | ||||
| 	_local_game_path="${HOME}/${_game_dir}/${_game_name}" | ||||
| 	_remote_game_path="${remote_dir}/${_game_dir}/${_game_name}" | ||||
| 	_remote_game_path="${home_remote_dir}/${_game_dir}/${_game_name}" | ||||
| 
 | ||||
| 	## If a remote directory doesn't already exists for this game | ||||
| 	if [ ! -d "${_remote_game_path}" ]; then | ||||
|  | @ -62,7 +63,7 @@ symlink_game_dir() { | |||
| 	_game_name="${1}" | ||||
| 	_game_dir="${2}" | ||||
| 	_local_game_path="${HOME}/${_game_dir}/${_game_name}" | ||||
| 	_remote_game_path="${remote_dir}/${_game_dir}/${_game_name}" | ||||
| 	_remote_game_path="${home_remote_dir}/${_game_dir}/${_game_name}" | ||||
| 
 | ||||
| 	if [ -d "${_remote_game_path}" ]; then | ||||
| 		ln -s -- "${_remote_game_path}" "${_local_game_path}" | ||||
|  | @ -94,7 +95,7 @@ for game_path in ${games_list}; do | |||
| 	local_game_path_type="$(ls -ld "${local_game_path}" | sed 's/\(^.\).*/\1/')" | ||||
| 
 | ||||
| 	game_name="$(basename "${game_path}")" | ||||
| 	game_dir="$(direname "${game_path}")" | ||||
| 	game_dir="$(dirname "${game_path}")" | ||||
| 
 | ||||
| 	case ${local_game_path_type} in | ||||
| 		## Data is already a symlink | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue