mirror of
				https://github.com/pelican-eggs/eggs.git
				synced 2025-10-31 17:08:06 +00:00 
			
		
		
		
	update file unpacker script
update file unpacker script to work with the github release grabber and download validation script
This commit is contained in:
		
							parent
							
								
									237ae0613d
								
							
						
					
					
						commit
						7dfc5ce471
					
				| @ -3,11 +3,16 @@ | |||||||
| ## The value for ${DOWNLOAD_LINK##*/} is derived from DOWNLOAD_LINK | ## The value for ${DOWNLOAD_LINK##*/} is derived from DOWNLOAD_LINK | ||||||
| ## if the download link is https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar then the ##*/ is server.jar | ## if the download link is https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar then the ##*/ is server.jar | ||||||
| 
 | 
 | ||||||
|  | apt update | ||||||
|  | apt install -y curl file unzip | ||||||
|  | 
 | ||||||
|  | curl -sSL ${DOWNLOAD_LINK} | ||||||
|  | 
 | ||||||
| FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*/} | cut -d',' -f2 | cut -d' ' -f2) | FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*/} | cut -d',' -f2 | cut -d' ' -f2) | ||||||
| if [ "$FILETYPE" == "gzip" ]; then | if [ "$FILETYPE" == "gzip" ]; then | ||||||
|     tar xzvf ${DOWNLOAD_LINK##*/} |     tar xzvf ${DOWNLOAD_LINK##*/} | ||||||
| elif [ "$FILETYPE" == "Zip" ]; then | elif [ "$FILETYPE" == "Zip" ]; then | ||||||
|     unzip ${DOWNLOAD_LINK##*/} |     unzip -o ${DOWNLOAD_LINK##*/} | ||||||
| elif [ "$FILETYPE" == "XZ" ]; then | elif [ "$FILETYPE" == "XZ" ]; then | ||||||
|     tar xvf ${DOWNLOAD_LINK##*/} |     tar xvf ${DOWNLOAD_LINK##*/} | ||||||
| else | else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user