Add a Makefile target that commits an updated Nethack logfile
This commit is contained in:
		
							parent
							
								
									97c92d209d
								
							
						
					
					
						commit
						e8e0a35064
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		
							
								
								
									
										7
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -20,11 +20,16 @@ deploy: site
 | 
				
			||||||
	@echo "Deploying to $(DEPLOY_LOCATION)"
 | 
						@echo "Deploying to $(DEPLOY_LOCATION)"
 | 
				
			||||||
	rsync -avz --no-times --no-perms --delete public/ $(DEPLOY_LOCATION)
 | 
						rsync -avz --no-times --no-perms --delete public/ $(DEPLOY_LOCATION)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
nethack: $(NETHACK_LOGFILE)
 | 
					nethack: nethack-logfile nethack-commit
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nethack-logfile: $(NETHACK_LOGFILE)
 | 
				
			||||||
ifeq (,$(wildcard $<))
 | 
					ifeq (,$(wildcard $<))
 | 
				
			||||||
	@echo "Importing Nethack logfile from $(NETHACK_LOGFILE)"
 | 
						@echo "Importing Nethack logfile from $(NETHACK_LOGFILE)"
 | 
				
			||||||
	scripts/import-nethack-logfile.py -o $(NETHACK_LOGFILE_DATA_FILE) $<
 | 
						scripts/import-nethack-logfile.py -o $(NETHACK_LOGFILE_DATA_FILE) $<
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nethack-commit: $(NETHACK_LOGFILE_DATA_FILE)
 | 
				
			||||||
 | 
						if ! git diff --quiet $<; then git commit -m "Update Nethack logfile for $(HOSTNAME)" -- $<; fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
	rm -rf public/
 | 
						rm -rf public/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue