Move save.game script to specific directory
This commit is contained in:
		
							parent
							
								
									9ae6f2eecf
								
							
						
					
					
						commit
						43f682d7e8
					
				|  | @ -1,5 +1,26 @@ | |||
| #!/bin/sh | ||||
| 
 | ||||
| # Purpose {{{ | ||||
| ## Try to centralize all game's save in order to : | ||||
| ##	easily backup all save | ||||
| ##	easily restore it | ||||
| ##	be able to access it from anywhere | ||||
| ##	… all you can do with a Nextcloud (share, versionning,…) | ||||
| ## | ||||
| ## 1. Move save directories of a list of known games from Steam's | ||||
| ## userdata to a remote directory (Nextcloud, remote mount,…). | ||||
| ## Then create a symlink in userdata directory to the remote game | ||||
| ## directory. | ||||
| ## | ||||
| ## 2. If a directory doesn't exist, check if a remote one is | ||||
| ## available and symlink it. | ||||
| ## | ||||
| ## TODO : 3. List directories without symlinks. | ||||
| ## | ||||
| ## KISS : Only manage save directories from Steam userdata. For other | ||||
| ## paths ($XDG_DATA_HOME,…) check other scripts. | ||||
| # }}} | ||||
| 
 | ||||
| # Vars {{{ | ||||
| debug=0 | ||||
| 
 | ||||
|  | @ -82,7 +103,6 @@ for game_id in ${steam_games}; do | |||
| 	local_game_path="${local_steam_userdata}/${game_id}" | ||||
| 	local_game_path_type="$(file ${local_steam_userdata}/${game_id} | cut -d' ' -f2)" | ||||
| 
 | ||||
| 
 | ||||
| 	case ${local_game_path_type} in | ||||
| 		## Data is already a symlink | ||||
| 		"symbolic") | ||||
|  | @ -102,6 +122,6 @@ for game_id in ${steam_games}; do | |||
| 			exit 3 | ||||
| 			;; | ||||
| 	esac | ||||
| # }}} | ||||
| 
 | ||||
| done | ||||
| # }}} | ||||
		Loading…
	
		Reference in New Issue