link type emulator to ourself
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								40d494ace2
							
						
					
				
			
			
				commit
				
					
						1b0d85dcbe
					
				
			
		
					 1 changed files with 13 additions and 1 deletions
				
			
		
							
								
								
									
										14
									
								
								bin/cdist
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								bin/cdist
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -367,7 +367,7 @@ class Cdist:
 | 
			
		|||
   def link_type_to_emulator(self):
 | 
			
		||||
      """Link type names to cdist-type-emulator"""
 | 
			
		||||
      for type in self.list_types():
 | 
			
		||||
         source = os.path.join(self.lib_dir, "cdist-type-emulator")
 | 
			
		||||
         source = sys.argv[0]
 | 
			
		||||
         destination = os.path.join(self.bin_dir, type)
 | 
			
		||||
         log.debug("Linking %s to %s", source, destination)
 | 
			
		||||
         os.symlink(source, destination)
 | 
			
		||||
| 
						 | 
				
			
			@ -637,6 +637,18 @@ def emulator():
 | 
			
		|||
   """Emulate type commands (i.e. __file and co)"""
 | 
			
		||||
   type = os.path.basename(sys.argv[0])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   parser = argparse.ArgumentParser(add_help=False)
 | 
			
		||||
 | 
			
		||||
   print("Oh, noe")
 | 
			
		||||
   sys.exit(1)
 | 
			
		||||
 | 
			
		||||
   # Setup optional parameters
 | 
			
		||||
   # Setup required parameters
 | 
			
		||||
   # Setup positional parameter, if not singleton
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def commandline():
 | 
			
		||||
   """Parse command line"""
 | 
			
		||||
   # Construct parser others can reuse
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue