seperate loading from execution
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								9813c38657
							
						
					
				
			
			
				commit
				
					
						c24cf52ce4
					
				
			
		
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -23,12 +23,17 @@
 | 
			
		|||
 | 
			
		||||
find "${CDIST_LIBDIR}" -type f -name cdist_explore\*.sh > "${CDIST_TMP}"
 | 
			
		||||
 | 
			
		||||
# first load all functions
 | 
			
		||||
while read funcfull; do
 | 
			
		||||
   sh="${funcfull##*/}"
 | 
			
		||||
   func="${sh%.sh}"
 | 
			
		||||
   var="__$func"
 | 
			
		||||
 | 
			
		||||
   cat "${funcfull}"
 | 
			
		||||
done < "${CDIST_TMP}"
 | 
			
		||||
 | 
			
		||||
# then execute functions
 | 
			
		||||
while read funcfull; do
 | 
			
		||||
   echo "$var=\"\$($func)\""
 | 
			
		||||
   echo "echo $var=\\\"\$$var\\\""
 | 
			
		||||
done < "${CDIST_TMP}"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue