You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							37 lines
						
					
					
						
							1022 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							37 lines
						
					
					
						
							1022 B
						
					
					
				
								#!/usr/bin/env python
							 | 
						|
								# -*- coding: utf-8 -*-
							 | 
						|
								# #!/usr/bin/python3
							 | 
						|
								# based on EnlivenMinetest/utilities/install-lmk
							 | 
						|
								#
							 | 
						|
								# The copy in hierosoft is relicensed by Poikilos (original author)
							 | 
						|
								# under license of hierosoft
							 | 
						|
								'''
							 | 
						|
								install-lmk
							 | 
						|
								-----------
							 | 
						|
								Use any "minetest" folder under the current working directory
							 | 
						|
								to install or upgrade.
							 | 
						|
								
							 | 
						|
								Developers: If /opt/minebest/mtkit is present, that will be used.
							 | 
						|
								
							 | 
						|
								See hierosoft.hminetestsrc documentation for more info.
							 | 
						|
								'''
							 | 
						|
								import re
							 | 
						|
								import sys
							 | 
						|
								import os
							 | 
						|
								
							 | 
						|
								SCRIPTS_DIR = os.path.dirname(os.path.realpath(__file__))
							 | 
						|
								REPO_DIR = os.path.dirname(SCRIPTS_DIR)
							 | 
						|
								
							 | 
						|
								if __name__ == "__main__":
							 | 
						|
								    sys.path.insert(0, REPO_DIR)
							 | 
						|
								
							 | 
						|
								# if os.path.isfile(os.path.join(repos_dir, "hierosoft", "init.py")):
							 | 
						|
								#     sys.path.insert(repos_dir)
							 | 
						|
								# ^ implies both are installed (and that repos_dir is actually modules_dir),
							 | 
						|
								#   so leave path alone.
							 | 
						|
								
							 | 
						|
								from pyenliven.mtpatches import main  # noqa E402
							 | 
						|
								
							 | 
						|
								if __name__ == '__main__':
							 | 
						|
								    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
							 | 
						|
								    sys.exit(main())
							 | 
						|
								
							 |