mirror of
				https://gitea.blesmrt.net/mikaela/gist.git
				synced 2025-10-31 17:37:19 +01:00 
			
		
		
		
	backup-ops2l-vmc.bash: initial commit
This commit is contained in:
		
							parent
							
								
									27100273c0
								
							
						
					
					
						commit
						dedd4914b2
					
				
							
								
								
									
										2
									
								
								gayming/playstation2/.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								gayming/playstation2/.gitattributes
									
									
									
									
										vendored
									
									
								
							| @ -3,4 +3,4 @@ | ||||
| # uses lf though, but maybe that doesn't matter in source code. | ||||
| * text=auto eol=crlf | ||||
| # Not for PS2 consumption | ||||
| *.{sh,bash} text eol=lf | ||||
| *.bash text eol=lf | ||||
|  | ||||
							
								
								
									
										15
									
								
								gayming/playstation2/backup-ops2l-vmc.bash
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								gayming/playstation2/backup-ops2l-vmc.bash
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,15 @@ | ||||
| #!/usr/bin/env bash | ||||
| # This is just a simple script to backup VMCs in case something goes wrong | ||||
| set -x | ||||
| 
 | ||||
| VMCDIR=~/PS2/VMC | ||||
| BACKUPDIR=~/PS2-VMC-backups | ||||
| 
 | ||||
| mkdir -p $BACKUPDIR | ||||
| # E.g. 2023-075TT1719, I don't think change of month matters and these are | ||||
| # going to be small 8MB files anyway so seeing the age at glance is nice. | ||||
| # WARNING: This doesn't handle DST switch althůgh I don't expect to be | ||||
| # playing or running this script during the problem hours | ||||
| cp -rv "$VMCDIR" "$BACKUPDIR/$(date +%Y-%jT%H%M)" | ||||
| 
 | ||||
| set +x | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user