mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Refactor get_tails()
This commit is contained in:
		
							parent
							
								
									ea509ac5e0
								
							
						
					
					
						commit
						4bafb49e0a
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		
							
								
								
									
										12
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								quickget
									
										
									
									
									
								
							|  | @ -1333,11 +1333,17 @@ function get_regolith() { | |||
| } | ||||
| 
 | ||||
| function get_tails() { | ||||
|     local ISO="" | ||||
|     local HASH="" | ||||
|     local RELEASE_JSON_URL="" | ||||
|     local RELEASE_JSON="" | ||||
|     local URL="" | ||||
| 
 | ||||
|     validate_release "releases_tails" | ||||
|     RELEASE_JSON_URL="https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json" | ||||
|     RELEASE_JSON="$(wget -q -O- "$RELEASE_JSON_URL")" | ||||
|     URL=$(echo "$RELEASE_JSON" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url') | ||||
|     HASH=$(echo "$RELEASE_JSON" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256') | ||||
|     RELEASE_JSON="$(wget -q -O- "${RELEASE_JSON_URL}")" | ||||
|     URL=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url') | ||||
|     HASH=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256') | ||||
|     ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/") | ||||
|     web_get "${URL}" "${VM_PATH}" | ||||
|     check_hash "${ISO}" "${HASH}" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue