Copy install-eggs for arm adjustments.
This commit is contained in:
		
							parent
							
								
									24e0b487c5
								
							
						
					
					
						commit
						0d83aa699b
					
				
					 1 changed files with 61 additions and 0 deletions
				
			
		
							
								
								
									
										61
									
								
								install-eggs-arm.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								install-eggs-arm.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,61 @@ | ||||||
|  | #!/bin/sh | ||||||
|  | # | ||||||
|  | # install-eggs.sh | ||||||
|  | # | ||||||
|  | # Local installer of CHICKEN eggs required for building. | ||||||
|  | # | ||||||
|  | # ISC License | ||||||
|  | # | ||||||
|  | # Copyright 2023 Brmlab, z.s. | ||||||
|  | # Dominik Pantůček <dominik.pantucek@trustica.cz> | ||||||
|  | # | ||||||
|  | # Permission to use, copy, modify, and/or distribute this software | ||||||
|  | # for any purpose with or without fee is hereby granted, provided | ||||||
|  | # that the above copyright notice and this permission notice appear | ||||||
|  | # in all copies. | ||||||
|  | #  | ||||||
|  | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | ||||||
|  | # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||||||
|  | # WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | ||||||
|  | # AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR | ||||||
|  | # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | ||||||
|  | # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | ||||||
|  | # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | ||||||
|  | # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | # Source root directory | ||||||
|  | owd=$(pwd) | ||||||
|  | cd $(dirname "$0") | ||||||
|  | SRCDIR=$(pwd) | ||||||
|  | cd "$owd" | ||||||
|  | 
 | ||||||
|  | # Make temporary prefix directory (eggs shared throwaway files) | ||||||
|  | TMPDIR=$(mktemp -d) | ||||||
|  | 
 | ||||||
|  | # Installs given egg locally | ||||||
|  | chicken_install() { | ||||||
|  |     echo "Installing $1 ..." | ||||||
|  |     CHICKEN_INSTALL_PREFIX="$TMPDIR" \ | ||||||
|  | 			  CHICKEN_REPOSITORY_PATH="$SRCDIR/eggs":`chicken-install -repository` \ | ||||||
|  | 			  CHICKEN_INSTALL_REPOSITORY="$SRCDIR/eggs" \ | ||||||
|  | 			  chicken-install "$1" 2>&1 | \ | ||||||
|  | 	sed -u 's/^/  /' | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | # Removes throwaway files | ||||||
|  | chicken_cleanup() { | ||||||
|  |     echo "Cleaning up ..." | ||||||
|  |     rm -fr ${TMPDIR} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | # Always cleanup | ||||||
|  | trap chicken_cleanup INT QUIT | ||||||
|  | 
 | ||||||
|  | # Install required eggs | ||||||
|  | chicken_install spiffy | ||||||
|  | chicken_install openssl | ||||||
|  | chicken_install postgresql | ||||||
|  | 
 | ||||||
|  | # Normal termination cleanup | ||||||
|  | chicken_cleanup | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue