 c0d442364a
			
		
	
	
	
	
	c0d442364a* build: explicitly run scripts with python3 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			590 B
			
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			590 B
			
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
| #!/usr/bin/env python3
 | |
| 
 | |
| import argparse
 | |
| import sys
 | |
| 
 | |
| from lib import git
 | |
| from lib.patches import patch_from_dir
 | |
| 
 | |
| 
 | |
| def main(argv):
 | |
|   parser = argparse.ArgumentParser()
 | |
|   parser.add_argument("patch_dir",
 | |
|       help="directory containing patches to apply")
 | |
|   parser.add_argument("-3", "--3way",
 | |
|       action="store_true", dest='threeway',
 | |
|       help="use 3-way merge to resolve conflicts")
 | |
|   args = parser.parse_args(argv)
 | |
| 
 | |
|   git.import_patches(
 | |
|       repo='.',
 | |
|       patch_data=patch_from_dir(args.patch_dir),
 | |
|       threeway=args.threeway
 | |
|   )
 | |
| 
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|   main(sys.argv[1:])
 |