| 
									
										
										
										
											2008-09-16 00:20:33 -04:00
										 |  |  | ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov. | 
					
						
							|  |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							| 
									
										
										
										
											2008-12-15 02:13:35 -05:00
										 |  |  | USING: arrays continuations io.directories | 
					
						
							|  |  |  | io.directories.hierarchy io.files io.launcher kernel | 
					
						
							|  |  |  | mason.common mason.config mason.platform namespaces ;
 | 
					
						
							| 
									
										
										
										
											2008-09-16 00:20:33 -04:00
										 |  |  | IN: mason.cleanup | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-17 21:59:59 -04:00
										 |  |  | : compress ( filename -- )
 | 
					
						
							| 
									
										
										
										
											2009-05-12 17:52:43 -04:00
										 |  |  |     dup exists? [ "bzip2" swap 2array short-running-process ] [ drop ] if ;
 | 
					
						
							| 
									
										
										
										
											2009-04-17 21:59:59 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-09-16 00:20:33 -04:00
										 |  |  | : compress-image ( -- )
 | 
					
						
							| 
									
										
										
										
											2009-04-17 21:59:59 -04:00
										 |  |  |     boot-image-name compress ;
 | 
					
						
							| 
									
										
										
										
											2008-09-16 00:20:33 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : compress-test-log ( -- )
 | 
					
						
							| 
									
										
										
										
											2009-04-17 21:59:59 -04:00
										 |  |  |     "test-log" compress ;
 | 
					
						
							| 
									
										
										
										
											2008-09-16 00:20:33 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : cleanup ( -- )
 | 
					
						
							|  |  |  |     builder-debug get [ | 
					
						
							|  |  |  |         build-dir [ | 
					
						
							|  |  |  |             compress-image | 
					
						
							|  |  |  |             compress-test-log | 
					
						
							| 
									
										
										
										
											2011-10-19 05:32:30 -04:00
										 |  |  |             "factor" delete-tree | 
					
						
							| 
									
										
										
										
											2008-09-16 00:20:33 -04:00
										 |  |  |         ] with-directory | 
					
						
							|  |  |  |     ] unless ;
 |