|  |  | @ -1,13 +1,13 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | #!/usr/bin/env python3 |  |  |  | #!/usr/bin/env python3 | 
			
		
	
		
		
			
				
					
					|  |  |  | import argparse |  |  |  | import argparse | 
			
		
	
		
		
			
				
					
					|  |  |  | import json |  |  |  | import json | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import os | 
			
		
	
		
		
			
				
					
					|  |  |  | import pathlib |  |  |  | import pathlib | 
			
		
	
		
		
			
				
					
					|  |  |  | import tempfile |  |  |  | import tempfile | 
			
		
	
		
		
			
				
					
					|  |  |  | import time |  |  |  | import time | 
			
		
	
		
		
			
				
					
					|  |  |  | from openpilot.common.basedir import BASEDIR |  |  |  | from openpilot.common.basedir import BASEDIR | 
			
		
	
		
		
			
				
					
					|  |  |  | from openpilot.system.hardware.tici.agnos import StreamingDecompressor, unsparsify, noop, AGNOS_MANIFEST_FILE |  |  |  | from openpilot.system.hardware.tici.agnos import StreamingDecompressor, unsparsify, noop, AGNOS_MANIFEST_FILE | 
			
		
	
		
		
			
				
					
					|  |  |  | from openpilot.system.updated.casync.common import create_casync_from_file |  |  |  | from openpilot.system.updated.casync.common import create_casync_from_file | 
			
		
	
		
		
			
				
					
					|  |  |  | from openpilot.system.version import get_agnos_version |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -15,7 +15,6 @@ if __name__ == "__main__": | 
			
		
	
		
		
			
				
					
					|  |  |  |   parser = argparse.ArgumentParser(description="creates a casync release") |  |  |  |   parser = argparse.ArgumentParser(description="creates a casync release") | 
			
		
	
		
		
			
				
					
					|  |  |  |   parser.add_argument("output_dir", type=str, help="output directory for the channel") |  |  |  |   parser.add_argument("output_dir", type=str, help="output directory for the channel") | 
			
		
	
		
		
			
				
					
					|  |  |  |   parser.add_argument("working_dir", type=str, help="working directory") |  |  |  |   parser.add_argument("working_dir", type=str, help="working directory") | 
			
		
	
		
		
			
				
					
					|  |  |  |   parser.add_argument("--version", type=str, help="version of agnos this is", default=get_agnos_version()) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   parser.add_argument("--manifest", type=str, help="json manifest to create agnos release from", \ |  |  |  |   parser.add_argument("--manifest", type=str, help="json manifest to create agnos release from", \ | 
			
		
	
		
		
			
				
					
					|  |  |  |                         default=str(pathlib.Path(BASEDIR) / AGNOS_MANIFEST_FILE)) |  |  |  |                         default=str(pathlib.Path(BASEDIR) / AGNOS_MANIFEST_FILE)) | 
			
		
	
		
		
			
				
					
					|  |  |  |   args = parser.parse_args() |  |  |  |   args = parser.parse_args() | 
			
		
	
	
		
		
			
				
					|  |  | @ -53,5 +52,6 @@ if __name__ == "__main__": | 
			
		
	
		
		
			
				
					
					|  |  |  |       print(f"downloaded in {time.monotonic() - start}") |  |  |  |       print(f"downloaded in {time.monotonic() - start}") | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       start = time.monotonic() |  |  |  |       start = time.monotonic() | 
			
		
	
		
		
			
				
					
					|  |  |  |       create_casync_from_file(entry_path, output_dir, f"agnos-{args.version}-{entry['name']}") |  |  |  |       agnos_filename = os.path.basename(entry["url"]).split(".")[0] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       create_casync_from_file(entry_path, output_dir, agnos_filename) | 
			
		
	
		
		
			
				
					
					|  |  |  |       print(f"created casnc in {time.monotonic() - start}") |  |  |  |       print(f"created casnc in {time.monotonic() - start}") | 
			
		
	
	
		
		
			
				
					|  |  | 
 |