mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	setup.py: add option to define build tree
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		
							
								
								
									
										8
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								setup.py
									
									
									
									
									
								
							| @@ -104,7 +104,7 @@ def update_patches(): | |||||||
| 		) | 		) | ||||||
| 		os.chdir(openwrt) | 		os.chdir(openwrt) | ||||||
| 		run( | 		run( | ||||||
| 			["git", "format-patch", config.get("revision", config["branch"]), "-o", "../patches"], | 			["git", "format-patch", config.get("revision", config["branch"]), "-o", base_dir / "patches"], | ||||||
| 			check=True, | 			check=True, | ||||||
| 		) | 		) | ||||||
| 		print("### Updating done") | 		print("### Updating done") | ||||||
| @@ -120,12 +120,12 @@ setup = False | |||||||
| update = False | update = False | ||||||
| rebase = False | rebase = False | ||||||
| config = "config.yml" | config = "config.yml" | ||||||
| profiles = "../profiles" | profiles = base_dir / "profiles" | ||||||
| openwrt = "openwrt" | openwrt = "openwrt" | ||||||
| git_ref = "" | git_ref = "" | ||||||
|  |  | ||||||
| try: | try: | ||||||
| 	opts, args = getopt.getopt(sys.argv[1:], "srdc:f:u2", ["setup", "rebase", "config=", "folder=", "reference=", "update", "20x" ]) | 	opts, args = getopt.getopt(sys.argv[1:], "srd:c:f:u2", ["setup", "rebase", "config=", "folder=", "reference=", "update", "20x", "directory=" ]) | ||||||
| except getopt.GetoptError as err: | except getopt.GetoptError as err: | ||||||
| 	print(err) | 	print(err) | ||||||
| 	sys.exit(2) | 	sys.exit(2) | ||||||
| @@ -142,6 +142,8 @@ for o, a in opts: | |||||||
| 		config = a | 		config = a | ||||||
| 	elif o in ("--reference"): | 	elif o in ("--reference"): | ||||||
| 		git_ref = a | 		git_ref = a | ||||||
|  | 	elif o in ("-d", "--directory"): | ||||||
|  | 		openwrt = a | ||||||
| 	else: | 	else: | ||||||
| 		assert False, "unhandled option" | 		assert False, "unhandled option" | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin