added a flatg to auto-reload the newly compiled script
This commit is contained in:
		
							parent
							
								
									958985df83
								
							
						
					
					
						commit
						26b2670602
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -69,7 +69,11 @@ echo "##################" >> $COMPILED_SRC
 | 
			
		|||
echo "# Reloader Script" >> $COMPILED_SRC
 | 
			
		||||
echo """##################
 | 
			
		||||
function __rebuild_bashrcd() {
 | 
			
		||||
	bash """$SELF_SRC"""
 | 
			
		||||
	bash \""""$SELF_SRC"""\"
 | 
			
		||||
	if [[ \$? -eq 0 && \"\${1}\" == '-a' ]]; then
 | 
			
		||||
		echo "Automatically loading compiled script."
 | 
			
		||||
		source \""""$(readlink -f "$COMPILED_SRC")"""\"
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
""" >> $COMPILED_SRC
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue